public class MathUtility
extends java.lang.Object
Constructor and Description |
---|
MathUtility() |
Modifier and Type | Method and Description |
---|---|
static double |
choose(int n,
int k) |
static double[][] |
createMatrix(int nrows,
int ncols) |
static double |
factorial(int n) |
static void |
fillMatrix(double[][] a,
double val) |
static double |
fmod(double x,
double m)
Computes a floating point modulo operation of
the value x to m such that the result is in the
range [0,m)
|
static void |
main(java.lang.String[] args) |
static double |
maxDouble(java.util.Iterator<java.lang.Double> iterator) |
static double |
minDouble(java.util.Iterator<java.lang.Double> iterator) |
static double |
prod(int i,
int j) |
static double |
quantile(double[] array,
double q) |
static <T> T |
quantile(java.util.Vector<T> array,
java.util.Comparator<T> c,
float q) |
static double |
restrict(double value,
double lower,
double upper)
Restricts the given value value to the interval
[lower,upper].
|
static float |
restrict(float value,
float lower,
float upper) |
static int |
restrict(int value,
int lower,
int upper)
Restricts the given value value to the interval
[lower,upper].
|
static int |
sign(double x) |
static double |
square(double x) |
static void |
unitMatrix(double[][] a) |
public static int sign(double x)
public static double square(double x)
public static double restrict(double value, double lower, double upper)
value
- lower
- upper
- public static float restrict(float value, float lower, float upper)
public static int restrict(int value, int lower, int upper)
value
- lower
- upper
- public static double maxDouble(java.util.Iterator<java.lang.Double> iterator)
public static double minDouble(java.util.Iterator<java.lang.Double> iterator)
public static double factorial(int n)
public static double prod(int i, int j)
public static double choose(int n, int k)
public static double fmod(double x, double m)
x
- m
- public static double[][] createMatrix(int nrows, int ncols)
public static void fillMatrix(double[][] a, double val)
public static void unitMatrix(double[][] a)
public static <T> T quantile(java.util.Vector<T> array, java.util.Comparator<T> c, float q)
public static double quantile(double[] array, double q)
public static void main(java.lang.String[] args)
Copyright © 2010-2014 Pacific Biosciences. All Rights Reserved.