public final class BinghamDistribution extends java.lang.Object implements AxialDistribution
9.4.3 of Mardia and Jupp ("Directional Statistics", Wiley, 2000)
Constructor and Description |
---|
BinghamDistribution(Vector3D[] axes,
double k1,
double k2,
double normC,
java.util.Random random) |
Modifier and Type | Method and Description |
---|---|
Vector3D |
e1()
Eigenvector corresponding to the smallest eigenvalue of T.
|
Vector3D |
e2()
Eigenvector corresponding to the second eigenvalue of T.
|
Vector3D |
e3()
Eigenvector corresponding to the largest eigenvalue of T.
|
static BinghamDistribution |
getBinghamDistribution(Vector3D[] axes,
double[] kappas,
java.util.Random random) |
static BinghamDistribution |
getBinghamDistribution(Vector3D[] axes,
double k1,
double k2,
java.util.Random random) |
double |
k1()
Gets the concentration parameter k1 where k1 <= k2 <= 0.
|
double |
k2()
Gets the concentration parameter k2 where k1 <= k2 <= 0.
|
double |
logNormC() |
double |
logPDF(Vector3D x)
Evaluate the pdf of the distribution.
|
Vector3D |
nextVector()
Gets the next Vector from the distribution.
|
static Vector3D |
nextVector(Vector3D[] axes,
double k1,
double k2,
double logNormC,
java.util.Random ran) |
double |
normC() |
double |
pdf(Vector3D x)
Evaluate the pdf of the distribution.
|
static double |
pdf(Vector3D[] axes,
double[] bingPars,
Vector3D x)
Evaluate the pdf of the distribution.
|
java.lang.String |
toString() |
public BinghamDistribution(Vector3D[] axes, double k1, double k2, double normC, java.util.Random random)
axes
- the axes sorted by their eigenvalues (greatest first). In the limit that k1 == k2, the distribution is Watson with mu == axes[2].k1
- the first concentration parameterk2
- the second concentration parameternormC
- the normalization constantpublic static BinghamDistribution getBinghamDistribution(Vector3D[] axes, double[] kappas, java.util.Random random) throws ConvergenceException
kappas
- {k1, k2}.ConvergenceException
public static BinghamDistribution getBinghamDistribution(Vector3D[] axes, double k1, double k2, java.util.Random random) throws ConvergenceException
ConvergenceException
public double pdf(Vector3D x)
pdf
in interface AxialDistribution
x
- a unit vector on the unit sphere.public double logPDF(Vector3D x)
x
- a unit vector on the unit sphere.public static double pdf(Vector3D[] axes, double[] bingPars, Vector3D x)
x
- a unit vector on the unit sphere.public Vector3D nextVector()
AxialDistribution
nextVector
in interface AxialDistribution
public static Vector3D nextVector(Vector3D[] axes, double k1, double k2, double logNormC, java.util.Random ran)
public double k1()
public double k2()
public Vector3D e1()
public Vector3D e2()
public Vector3D e3()
public double normC()
public double logNormC()
public java.lang.String toString()
toString
in class java.lang.Object