Package uk.ac.starlink.topcat.plot

# Interface Points

All Known Subinterfaces:
  `PointStore`

All Known Implementing Classes:
  `CartesianPointStore`, `SphericalPolarPointStore`

public interface Points
Encapsulates a list of N-dimensional points in data space, perhaps with additional information about error bounds.

Since:
  16 June 2004
Author:
  Mark Taylor (Starlink)

## Method Summary

Modifier and Type
Method
Description
`int`
`getCount()`
Returns the number of points in this dataset.
`double[][]`
`getErrors(int ipoint)`
Reads the errors for one of the stored points.
`String`
`getLabel(int ipoint)`
Returns a string associated with a given point.
`int`
`getNdim()`
Returns the length of the coordinate array for each point.
`int`
`getNerror()`
Returns the number of error points returned for each point.
`double[]`
`getPoint(int ipoint)`
Reads the coordinates of one of the stored points.
`boolean`
`hasLabels()`
Indicates whether a string label is associated with some points.

## Method Details

### getCount

int getCount()
Returns the number of points in this dataset.

Returns:
  numer of points

### getNdim

int getNdim()
Returns the length of the coordinate array for each point.

Returns:
  number of coordinate values at each point

### getPoint

double[] getPoint(int ipoint)
Reads the coordinates of one of the stored points. The returned array may be modified by subsequent calls to this method. The caller is also permitted to modify it.

Parameters:
  `ipoint` - point index
Returns:
  coords an ndim-element array containing point coordinates

### getNerror

int getNerror()
Returns the number of error points returned for each point.

Returns:
  number of error values at each point

### getErrors

double[][] getErrors(int ipoint)
Reads the errors for one of the stored points. The returned value is an array of `nerror` double[] arrays, each of which has `ndim` elements and represents the coordinates of the end of an error bar. If any of these coordinate arrays is `null`, it represents an error bar of zero size, that is one whose end sits right on the data point. The ordering of these points is up to the user of this object, but typically they will be in pairs, e.g. (xlo,xhi, ylo,hi, ...). The content of the returned double[][] array and of its elements may be modified by subsequent calls to this method. The caller is also permitted to modify these.

Parameters:
  `ipoint` - point index
Returns:
  double[nerr][ndim] array with error extremum coordinates

### hasLabels

boolean hasLabels()
Indicates whether a string label is associated with some points.

Returns:
  true if `getLabel(int)` may return a non-null value for any point

### getLabel

String getLabel(int ipoint)
Returns a string associated with a given point. May only return a non-null value if `hasLabels()` returns true.

Parameters:
  `ipoint` - point index
Returns:
  label associated with points