FreeHEP API
Version 3.0

hep.aida
Interface IDataPointSet


public interface IDataPointSet

Basic user-level interface class for holding and managing a single set of "data points".

Author:
The AIDA team (http://aida.freehep.org/)

Method Summary
 void addPoint()
          Add a new empty IDataPoint at the end of the set.
 void addPoint(IDataPoint point)
          Add a copy of an IDataPoint at the end of the set.
 IAnnotation annotation()
          Get the IAnnotation of the IDataPointSet.
 void clear()
          Remove all the IDataPoints in the set.
 int dimension()
          Get the dimension of the IDataPoints that can be stored in the set.
 double lowerExtent(int coord)
          Get the lower value for a give axis.
 IDataPoint point(int index)
          Get the IDataPoint at a give index in the set.
 void removePoint(int index)
          Remove the IDataPoint at a given index.
 void scale(double scaleFactor)
          Scales the values and the errors of all the measurements of each point by a given factor.
 void scaleErrors(double scaleFactor)
          Scales the errors of all the measurements of each point by a given factor.
 void scaleValues(double scaleFactor)
          Scales the values of all the measurements of each point by a given factor.
 void setTitle(String title)
          Set the title of the IDataPointSet.
 int size()
          Get the current size of the IDataPointSet, i.e. the number of IDataPoints contained in the set.
 String title()
          Get the title of the IDataPointSet.
 double upperExtent(int coord)
          Get the upper value for a give axis.
 

Method Detail

annotation

public IAnnotation annotation()
Get the IAnnotation of the IDataPointSet.

Returns:
The IAnnotation.

title

public String title()
Get the title of the IDataPointSet.

Returns:
The title.

setTitle

public void setTitle(String title)
              throws IllegalArgumentException
Set the title of the IDataPointSet.

Parameters:
title - The new title.
Throws:
IllegalArgumentException - If the title cannot be set.

dimension

public int dimension()
Get the dimension of the IDataPoints that can be stored in the set.

Returns:
The dimension of the IDataPoints storable in the set.

clear

public void clear()
Remove all the IDataPoints in the set. After this the IDataPointSet is as just created.


size

public int size()
Get the current size of the IDataPointSet, i.e. the number of IDataPoints contained in the set.

Returns:
The size of the IDataPointSet.

point

public IDataPoint point(int index)
Get the IDataPoint at a give index in the set.

Parameters:
index - The IDataPoint index.
Returns:
The corresponding IDataPoint.

addPoint

public void addPoint()
              throws RuntimeException
Add a new empty IDataPoint at the end of the set.

Throws:
RuntimeException - If a new IDataPoint cannot be added to the set.

addPoint

public void addPoint(IDataPoint point)
              throws IllegalArgumentException
Add a copy of an IDataPoint at the end of the set.

Parameters:
point - The IDataPoint to be added.
Throws:
IllegalArgumentException - If the point has the wrong dimension or if the point cannot be added.

removePoint

public void removePoint(int index)
                 throws IllegalArgumentException
Remove the IDataPoint at a given index.

Parameters:
index - The index of the IDataPoint to be removed.
Throws:
IllegalArgumentException - If the index is < 0 or >= size().

lowerExtent

public double lowerExtent(int coord)
                   throws IllegalArgumentException
Get the lower value for a give axis.

Parameters:
coord - The coordinate of the axis.
Returns:
The lower edge of the corresponding axis.
Throws:
IllegalArgumentException - if coord < 0 or coord >= dimension() or if the set is empty.

upperExtent

public double upperExtent(int coord)
                   throws IllegalArgumentException
Get the upper value for a give axis.

Parameters:
coord - The coordinate of the axis.
Returns:
The upper edge of the corresponding axis.
Throws:
IllegalArgumentException - if coord < 0 or coord >= dimension() or if the set is empty.

scale

public void scale(double scaleFactor)
           throws IllegalArgumentException
Scales the values and the errors of all the measurements of each point by a given factor.

Parameters:
scaleFactor - The scale factor.
Throws:
IllegalArgumentException - If an illegal scaleFactor is provided.

scaleValues

public void scaleValues(double scaleFactor)
                 throws IllegalArgumentException
Scales the values of all the measurements of each point by a given factor.

Parameters:
scaleFactor - The scale factor.
Throws:
IllegalArgumentException - If an illegal scaleFactor is provided.

scaleErrors

public void scaleErrors(double scaleFactor)
                 throws IllegalArgumentException
Scales the errors of all the measurements of each point by a given factor.

Parameters:
scaleFactor - The scale factor.
Throws:
IllegalArgumentException - If an illegal scaleFactor is provided.

FreeHEP API
Version 3.0

Copyright © 2000-2002 AIDA Team, All Rights Reserved.