public abstract class SphericalFunction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
SFPD_PARAMSCALE
Parameter scale used in the Powell routine for finding principal
directions.
|
Constructor and Description |
---|
SphericalFunction() |
Modifier and Type | Method and Description |
---|---|
double |
anisotropy()
The anisotropy is the square root of the order 2 normalised
moment.
|
double |
centralMoment(int order)
Computes the order-th central moment of the function over the
sphere.
|
double |
centralMoment(int order,
double[][] ksInt)
Computes the order-th central moment of the function over the
sphere.
|
RealMatrix |
getHessian(double[] x)
Computes the Hessian of the function at the specified
point.
|
RealMatrix |
getHessian(PD pd)
Computes the Hessian of the function at the specified
point.
|
double[] |
getPDs(double[][] samplePoints,
PDList pdsOpt)
Puts a list of peak directions found through sampling
followed by local optimization in pdsOpt.
|
PDList |
getPDsRS(double[][] samplePoints)
Samples the function at each point and returns a list of points
that are maximal with a fixed radius.
|
double |
getRadius(double theta,
double phi)
Return the radius of the function at a specified latitude and longitude.
|
abstract double |
getRadius(double x,
double y,
double z)
Return the radius along a specified vector.
|
static double |
getSearchRadius()
Returns the value of the search radius in the random sampling principal
direction extraction algorithm.
|
double[] |
getStats()
Computes the mean, variance, max and min of the spherical function and
returns them in an array.
|
double |
greatCircleCentralMoment(double[] u,
double pow)
returns the central moment of order pow of the spherical
function given a vector normal to the plane of the great
circle.
|
double |
greatCircleIntegral(double[] u)
returns the great circle integral given a vector normal to the
plane of the great circle.
|
double |
greatCirclePowerIntegral(double[] u,
double pow)
returns the great circle integral of the spherical function
raised to power pow given a vector normal to the
plane of the great circle.
|
double |
kurtosis()
The kurtosis is the 4th root of the order 4 normalised moment
normalised by the anisotropy.
|
double |
mean()
The mean of the function is the order 1 moment.
|
double |
mean(double[][] ksInt)
The mean of the function is the order 1 moment.
|
double |
moment(int order)
Computes the order-th moment of the function over the
sphere.
|
double |
moment(int order,
double[][] ksInt)
Computes the order-th moment of the function over the
sphere.
|
double |
normMoment(int order)
Computes the normalised order-th moment of the function over
the sphere.
|
double |
normMoment(int order,
double[][] ksInt)
Computes the normalised order-th moment of the function over
the sphere.
|
double |
numGreatCircleCentralMoment(double[] u,
double pow)
returns the great circle central moment of order pow given a
vector normal to the plane of the great circle
|
double |
numGreatCircleIntegral(double[] u)
returns the great circle integral given a vector
normal to the plane of the great circle
|
double |
numGreatCirclePowerIntegral(double[] u,
double pow)
returns the great circle integral of the function
raised to power pow given a vector
normal to the plane of the great circle
|
void |
setConvThresh(double thresh)
Sets the convergence threshold for Powell's algorithm used in
getPDs.
|
static void |
setSearchRadius(double newSearchRadius)
Sets the search radius in the random sampling principal direction
extraction algorithm.
|
double |
skewness()
The skewness is the cube root of order 3 normalised moment.
|
public static double SFPD_PARAMSCALE
public double getRadius(double theta, double phi)
theta
- The angle of colatitude.phi
- The angle of longitude.public abstract double getRadius(double x, double y, double z)
x
- The x coordinate of the point on the spherey
- The y coordinate of the point on the spherez
- The z coordinate of the point on the spherepublic double moment(int order)
order
- The order of the moment to compute.public double moment(int order, double[][] ksInt)
order
- The order of the moment to compute.ksInt
- List of points at which to sample the function.public double normMoment(int order)
order
- The order of the normalized moment.public double normMoment(int order, double[][] ksInt)
order
- The order of the normalized moment to compute.ksInt
- List of points at which to sample the function.public double centralMoment(int order)
order
- The order of the central moment.public double centralMoment(int order, double[][] ksInt)
order
- The order of the central moment to compute.ksInt
- List of points at which to sample the function.public double mean()
public double mean(double[][] ksInt)
ksInt
- List of points at which to sample the function.public double anisotropy()
public double skewness()
public double kurtosis()
public double[] getStats()
public double[] getPDs(double[][] samplePoints, PDList pdsOpt)
samplePoints
- List of points on the sphere at which to
sample the function in the initial search for maxima.pdsOpt
- A peak direction list that the method fills with the
directions it finds.public PDList getPDsRS(double[][] samplePoints)
samplePoints
- List of points on the sphere at which to
sample the functionseedOffset
- An offset of the seeds used in the random number generator
used to get the random rotations.public static void setSearchRadius(double newSearchRadius)
newSearchRadius
- The new value of the search radius.public static double getSearchRadius()
public void setConvThresh(double thresh)
thresh
- The new convergence threshold.public RealMatrix getHessian(PD pd)
pd
- The principal direction at which to compute the Hessian.public RealMatrix getHessian(double[] x)
x
- An array specifying the point on the sphere, in Cartesian
coordinates ([x, y, z]) at which to compute the Hessian
matrix.public double numGreatCircleIntegral(double[] u)
u
- unit vector defining plane of circle vectorpublic double greatCircleIntegral(double[] u)
u
- unit vector defining plane of circle vectorpublic double numGreatCirclePowerIntegral(double[] u, double pow)
u
- unit vector defining plane of circle vectorpow
- the power to raise the function topublic double greatCirclePowerIntegral(double[] u, double pow)
u
- unit vector defining plane of circle vectorpow
- the power to raise the function to.public double numGreatCircleCentralMoment(double[] u, double pow)
u
- unit vector defining plane of circle vectorpow
- the power to raise the function topublic double greatCircleCentralMoment(double[] u, double pow)
u
- unit vector defining plane of circle vectorpow
- the power to raise the function to.