|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.datatype.VectorExtensions
public class VectorExtensions
Extensions for vector-like data.
Method Summary | |
---|---|
static double |
euclideanNorm(java.util.Collection<java.lang.Double> vector)
Compute the Euclidean norm of a collection of doubles. |
static double |
euclideanNorm(double[] vector)
Compute the Euclidean norm of an array of doubles |
static void |
initNormal(java.util.List<java.lang.Double> vector,
double mean,
double stddev)
Initialize a collection of doubles with values from a normal distribution. |
static double |
L1Norm(java.util.Collection<java.lang.Double> vector)
Compute the L1 norm of a collection of doubles. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double euclideanNorm(java.util.Collection<java.lang.Double> vector)
vector
- the vector to compute the norm for
public static double euclideanNorm(double[] vector)
vector
- the vector to compute the norm for
public static double L1Norm(java.util.Collection<java.lang.Double> vector)
vector
- the vector to compute the norm for
public static void initNormal(java.util.List<java.lang.Double> vector, double mean, double stddev)
vector
- the vector to initializemean
- the mean of the normal distributionstddev
- the standard deviation of the normal distribution
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |