com.joptimizer.util
Class Utils
- java.lang.Object
-
- com.joptimizer.util.Utils
-
public class Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublecalculateDeterminant(double[][] ai, int dim)Brute-force determinant calculation.static double[][]createConstantDiagonalMatrix(int dim, double c)static doublegetDoubleMachineEpsilon()The smallest positive (epsilon) such that 1.0 + epsilon != 1.0.static intgetMaxIndex(double[] v)Get the index of the maximum entry.static intgetMinIndex(double[] v)Get the index of the minimum entry.static double[][]lowerTriangularMatrixUnverse(double[][] L)static DoubleMatrix2DrandomValuesMatrix(int rows, int cols, double min, double max)static DoubleMatrix2DrandomValuesMatrix(int rows, int cols, double min, double max, java.lang.Long seed)static DoubleMatrix2DrandomValuesPositiveMatrix(int rows, int cols, double min, double max, java.lang.Long seed)static RealMatrixsquareMatrixInverse(RealMatrix M)static double[][]upperTriangularMatrixUnverse(double[][] L)
-
-
-
Method Detail
-
randomValuesMatrix
public static DoubleMatrix2D randomValuesMatrix(int rows, int cols, double min, double max)
-
randomValuesMatrix
public static DoubleMatrix2D randomValuesMatrix(int rows, int cols, double min, double max, java.lang.Long seed)
-
randomValuesPositiveMatrix
public static DoubleMatrix2D randomValuesPositiveMatrix(int rows, int cols, double min, double max, java.lang.Long seed)
- See Also:
- "http://mathworld.wolfram.com/PositiveDefiniteMatrix.html"
-
getDoubleMachineEpsilon
public static final double getDoubleMachineEpsilon()
The smallest positive (epsilon) such that 1.0 + epsilon != 1.0.- See Also:
http://en.wikipedia.org/wiki/Machine_epsilon#Approximation_using_Java
-
squareMatrixInverse
public static RealMatrix squareMatrixInverse(RealMatrix M) throws SingularMatrixException
- Throws:
SingularMatrixException- See Also:
http://en.wikipedia.org/wiki/Machine_epsilon#Approximation_using_Java
-
getMaxIndex
public static int getMaxIndex(double[] v)
Get the index of the maximum entry.
-
getMinIndex
public static int getMinIndex(double[] v)
Get the index of the minimum entry.
-
createConstantDiagonalMatrix
public static final double[][] createConstantDiagonalMatrix(int dim, double c)
-
upperTriangularMatrixUnverse
public static final double[][] upperTriangularMatrixUnverse(double[][] L) throws java.lang.Exception- Throws:
java.lang.Exception
-
lowerTriangularMatrixUnverse
public static final double[][] lowerTriangularMatrixUnverse(double[][] L) throws java.lang.Exception- Throws:
java.lang.Exception
-
calculateDeterminant
public static final double calculateDeterminant(double[][] ai, int dim)Brute-force determinant calculation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG