Facemorph
Class PGA

java.lang.Object
  extended by Facemorph.PGA

public class PGA
extends java.lang.Object

Principal Geodesic Analysis for hyperspherical data (Experimental, only part completed)


Constructor Summary
PGA(java.util.Vector<double[]> data)
          Creates a new instance of PGA
 
Method Summary
 void addToAverage(double[] v, int n)
          Adds a sample to the average
 void calculateMean(java.util.Vector<double[]> data)
          Estimate the mean
 double[] getMean()
          Return the current estimate of the mean
static void main(java.lang.String[] args)
          The main method is used for testing
static void normalise(double[] vec)
          Subtract the mean of the vector's coords and normlise length to 1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGA

public PGA(java.util.Vector<double[]> data)
Creates a new instance of PGA

Parameters:
data - the data vectors to build the PGA from
Method Detail

calculateMean

public void calculateMean(java.util.Vector<double[]> data)
Estimate the mean

Parameters:
data - The data to use to estimate the mean

getMean

public double[] getMean()
Return the current estimate of the mean

Returns:
returns the current estimate of the mean

addToAverage

public void addToAverage(double[] v,
                         int n)
Adds a sample to the average

Parameters:
v - the sample to add
n - the number of samples previously added to the mean

normalise

public static void normalise(double[] vec)
Subtract the mean of the vector's coords and normlise length to 1

Parameters:
vec - the vector to normalise

main

public static void main(java.lang.String[] args)
The main method is used for testing

Parameters:
args -