net.talvi.puffinplot.data
Class GreatCircles

java.lang.Object
  extended by net.talvi.puffinplot.data.GreatCircles
All Implemented Interfaces:
FisherParams

public class GreatCircles
extends java.lang.Object
implements FisherParams

This class represents a set of great circles and a set of directions. It calculates a best-fitting mean direction from these data using the method of McFadden and McElhinny (1988).


Constructor Summary
GreatCircles(java.util.List<Vec3> endpoints, java.util.List<GreatCircle> circles)
          Calculates a mean direction from the supplied great circle and directions.
 
Method Summary
 double getA95()
          Returns the alpha-95 value denoting the 95% confidence interval.
 java.util.List<GreatCircle> getCircles()
          Returns the great circles which were originally supplied to the constructor.
static java.util.List<java.lang.String> getEmptyFields()
          Returns a list of empty strings equal in length to the number of parameters.
static java.util.List<java.lang.String> getHeaders()
          Returns the headers describing the parameters as a list of strings.
 double getK()
          Returns the k-value, an estimate of the precision parameter κ.
 int getM()
          Returns the number of stable endpoints used in the calculation.
 Vec3 getMeanDirection()
          Returns the best-fit mean direction for the supplied circles and directions.
 int getN()
          Returns the number of great circles used in the calculation.
 boolean isValid()
          Returns true if this great-circle fit is valid.
 java.util.List<java.lang.String> toStrings()
          Returns the statistical parameters as a list of strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreatCircles

public GreatCircles(java.util.List<Vec3> endpoints,
                    java.util.List<GreatCircle> circles)
Calculates a mean direction from the supplied great circle and directions.

Parameters:
endpoints - a set of directions (probably from linear PCA fits)
circles - a set of great circles
Method Detail

getM

public int getM()
Returns the number of stable endpoints used in the calculation.

Returns:
the number of stable endpoints used in the calculation

getN

public int getN()
Returns the number of great circles used in the calculation.

Returns:
the number of great circles used in the calculation

getCircles

public java.util.List<GreatCircle> getCircles()
Returns the great circles which were originally supplied to the constructor.

Returns:
the great circles which were originally supplied to the constructor

getMeanDirection

public Vec3 getMeanDirection()
Returns the best-fit mean direction for the supplied circles and directions.

Specified by:
getMeanDirection in interface FisherParams
Returns:
the best-fit mean direction for the supplied circles and directions

toStrings

public java.util.List<java.lang.String> toStrings()
Returns the statistical parameters as a list of strings. The order of the parameters is the same as the order of the headers provided by getHeaders().

Returns:
the statistical parameters as a list of strings

getEmptyFields

public static java.util.List<java.lang.String> getEmptyFields()
Returns a list of empty strings equal in length to the number of parameters.

Returns:
a list of empty strings equal in length to the number of parameters

getHeaders

public static java.util.List<java.lang.String> getHeaders()
Returns the headers describing the parameters as a list of strings.

Returns:
the headers describing the parameters

isValid

public boolean isValid()
Returns true if this great-circle fit is valid.

Returns:
true if this great-circle fit is valid

getA95

public double getA95()
Description copied from interface: FisherParams
Returns the alpha-95 value denoting the 95% confidence interval.

Specified by:
getA95 in interface FisherParams
Returns:
the alpha-95 value denoting the 95% confidence interval

getK

public double getK()
Description copied from interface: FisherParams
Returns the k-value, an estimate of the precision parameter κ.

Specified by:
getK in interface FisherParams
Returns:
the k-value, an estimate of the precision parameter κ