Package uk.ac.starlink.topcat.plot2

# Class PositionCriterion

java.lang.Object
uk.ac.starlink.topcat.plot2.PositionCriterion

public abstract class PositionCriterion extends Object
Defines a true/false test on a data position.

Since:
  29 Jan 2014
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`PositionCriterion()`

## Method Summary

Modifier and Type
Method
Description
`static PositionCriterion`
`createBlobCriterion(uk.ac.starlink.ttools.plot2.Surface surface, Shape blob)`
Returns a criterion to test whether point positions fall within a given shape in graphics coordinates.
`static PositionCriterion`
`createBoundsCriterion(uk.ac.starlink.ttools.plot2.Surface surface)`
Returns a criterion to test whether point positions fall within the plot bounds of a given surface.
`static PositionCriterion`
`createPartialBoundsCriterion(uk.ac.starlink.ttools.plot2.Surface surface)`
Returns a criterion to test whether partial positions fall within the plot bounds of a given surface.
`abstract boolean`
`isIncluded(double[] dpos)`
Evaluates the test for a data position.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PositionCriterion

public PositionCriterion()

## Method Details

### isIncluded

public abstract boolean isIncluded(double[] dpos)
Evaluates the test for a data position.

Parameters:
  `dpos` - data space coordinate array
Returns:
  true iff the given position fits this criterion

### createBoundsCriterion

public static PositionCriterion createBoundsCriterion(uk.ac.starlink.ttools.plot2.Surface surface)
Returns a criterion to test whether point positions fall within the plot bounds of a given surface.

Parameters:
  `surface` - plot surface
Returns:
  new criterion

### createPartialBoundsCriterion

public static PositionCriterion createPartialBoundsCriterion(uk.ac.starlink.ttools.plot2.Surface surface)
Returns a criterion to test whether partial positions fall within the plot bounds of a given surface. These partial positions are things like histogram data, which have an X but not a Y graphics coordinate. For this case, either X or Y coordinate within the plot bounds counts as success.

Parameters:
  `surface` - plot surface
Returns:
  new criterion

### createBlobCriterion

public static PositionCriterion createBlobCriterion(uk.ac.starlink.ttools.plot2.Surface surface, Shape blob)
Returns a criterion to test whether point positions fall within a given shape in graphics coordinates.

Parameters:
  `surface` - plot surface
  `blob` - test shape in graphics coordinates
Returns:
  new criterion