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 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