Package uk.ac.starlink.table.join

## Class AbstractSkyMatchEngine

- java.lang.Object
- - uk.ac.starlink.table.join.AbstractSkyMatchEngine

- All Implemented Interfaces:
    `MatchEngine`
  Direct Known Subclasses:
    `EllipseSkyMatchEngine`, `ErrorSkyMatchEngine`, `FixedSkyMatchEngine`

      public abstract class AbstractSkyMatchEngine
      extends java.lang.Object
      implements MatchEngine

  Abstract superclass for MatchEngines which work on the celestial sphere.
  Since:
    5 Sep 2011
  Author:
    Mark Taylor

- - ### Field Summary

    - ### Fields inherited from interface uk.ac.starlink.table.join.MatchEngine

      `NO_BINS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `AbstractSkyMatchEngine​(SkyPixellator pixellator, double scale)` | Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static double` | `calculateSeparation​(double alpha1, double delta1, double alpha2, double delta2)` | Returns the distance along a great circle between two points.
    `protected double` | `getScale()` | Returns the length scale used for sky pixellisation.
    `uk.ac.starlink.table.DescribedValue[]` | `getTuningParameters()` | Returns a set of DescribedValue objects whose values can be modified to tune the performance of the match.
    `protected void` | `setScale​(double scale)` | Sets the length scale used for sky pixellisation.
    `abstract java.lang.String` | `toString()` |

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

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

    - ### Methods inherited from interface uk.ac.starlink.table.join.MatchEngine

      `canBoundMatch, getBins, getMatchBounds, getMatchParameters, getMatchScoreInfo, getScoreScale, getTupleInfos, matchScore`

- - ### Constructor Detail

    - #### AbstractSkyMatchEngine

          protected AbstractSkyMatchEngine​(SkyPixellator pixellator,
                                           double scale)

      Constructor.
      Parameters:
        `pixellator` - handles sky pixellisation
        `scale` - initial length scale for pixels, in radians

  - ### Method Detail

    - #### setScale

          protected void setScale​(double scale)

      Sets the length scale used for sky pixellisation.
      Parameters:
        `scale` - pixel length scale in radians

    - #### getScale

          protected double getScale()

      Returns the length scale used for sky pixellisation.
      Returns:
        pixel length scale in radians

    - #### getTuningParameters

          public uk.ac.starlink.table.DescribedValue[] getTuningParameters()

      Description copied from interface: `MatchEngine`
      Returns a set of DescribedValue objects whose values can be modified to tune the performance of the match. This match engine's performance can be influenced by calling `DescribedValue.setValue(java.lang.Object)` on the returned objects.

      Changing these values will make no difference to the output of `MatchEngine.matchScore(java.lang.Object[], java.lang.Object[])`, but may change the output of `MatchEngine.getBins(java.lang.Object[])`. This may change the CPU and memory requirements of the match, but will not change the result. The default value should be something sensible, so that setting the value of these parameters is not in general required.

      Specified by:
        `getTuningParameters` in interface `MatchEngine`
      Returns:
        array of described values which may influence match performance

    - #### toString

          public abstract java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### calculateSeparation

          public static double calculateSeparation​(double alpha1,
                                                   double delta1,
                                                   double alpha2,
                                                   double delta2)

      Returns the distance along a great circle between two points.
      Parameters:
        `alpha1` - right ascension of point 1 in radians
        `delta1` - declination of point 1 in radians
        `alpha2` - right ascension of point 2 in radians
        `delta2` - declination of point 2 in radians
      Returns:
        angular separation of point 1 and point 2 in radians