|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ir.utilities.MoreMath
public class MoreMath
A place to put some additional math functions
Constructor Summary | |
---|---|
MoreMath()
|
Method Summary | |
---|---|
static double[] |
addVectors(double[] x,
double[] y)
Add two vectors and return the vector sum |
static double[] |
averageVectors(java.util.ArrayList<double[]> list)
Average all of the vectors in a list of vectors and return the average vector. |
static double |
log(double x,
double base)
Return logarithm of a given base |
static double |
log(double x,
int base)
|
static double |
log(int x,
double base)
|
static double |
log(int x,
int base)
|
static void |
printVector(double[] x)
Print a vector in the form [x,y,...z] to standard out |
static void |
printVector(double[] x,
java.io.PrintStream out)
Print a vector in the form [x,y,...z] to the print stream |
static double |
roundTo(double num,
int decimalPlaces)
Round a double to the given number of decimalPlaces |
static double[] |
vectorDivide(double[] x,
double c)
Divide a vector by a scalar and return the resulting vector |
static double |
vectorLength(double[] values)
|
static double |
vectorOneNorm(double[] values)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoreMath()
Method Detail |
---|
public static double roundTo(double num, int decimalPlaces)
public static double log(double x, double base)
public static double log(int x, int base)
public static double log(double x, int base)
public static double log(int x, double base)
public static double[] addVectors(double[] x, double[] y)
public static double[] vectorDivide(double[] x, double c)
public static double[] averageVectors(java.util.ArrayList<double[]> list)
public static void printVector(double[] x)
public static void printVector(double[] x, java.io.PrintStream out)
public static double vectorLength(double[] values)
public static double vectorOneNorm(double[] values)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |