public class Utils
extends java.lang.Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static double |
binomial(int n,
int k)
Binomial coefficient
|
static double |
distance(double[] v1,
double[] v2)
Euclidean norm btween given arrays
|
static double |
fact(int n)
Factorial function ( n!
|
static double |
gammaP(double a,
double x)
Incomplete gamma function
|
static double[][] |
initUpperTriangular(int n)
Creates storage for un upper triangular matrix.
|
static double |
lnBinomial(int n,
int k)
ln Binomial coefficient.
|
static double |
lnFactorial(int n)
Computes the log of Factorial function
|
static double |
lnGamma(double xx)
Computes the log of gamma function.
|
static double |
lnPermut(int n,
int k)
Computes ln( n!
|
static double |
permut(int n,
int k)
Computes n!
|
static double |
pow(double x,
int n)
Power function obtained by multiplying.
|
public static double lnPermut(int n, int k)
n
- k
- public static double permut(int n, int k)
n
- k
- public static double lnGamma(double xx)
xx
- valuepublic static double lnFactorial(int n)
n
- public static double fact(int n)
n
- public static double gammaP(double a, double x)
a
- argumentx
- upper limitpublic static double binomial(int n, int k)
n
- k
- public static double lnBinomial(int n, int k)
n
- k
- public static double pow(double x, int n)
x
- n
- public static double distance(double[] v1, double[] v2)
v1
- v2
- public static double[][] initUpperTriangular(int n)
n
-