Class MatrixAlgebraFactory
- java.lang.Object
-
- com.opengamma.strata.math.impl.matrix.MatrixAlgebraFactory
-
public final class MatrixAlgebraFactory extends Object
Factory class for various types of matrix algebra calculators.
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMMONS
Label for Commons matrix algebrastatic CommonsMatrixAlgebra
COMMONS_ALGEBRA
static String
OG
Label for OpenGamma matrix algebrastatic OGMatrixAlgebra
OG_ALGEBRA
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MatrixAlgebra
getMatrixAlgebra(String algebraName)
Given a name, returns an instance of the matrix algebra calculator.static String
getMatrixAlgebraName(MatrixAlgebra algebra)
Given a matrix algebra calculator, returns its name.
-
-
-
Field Detail
-
COMMONS
public static final String COMMONS
Label for Commons matrix algebra- See Also:
- Constant Field Values
-
OG
public static final String OG
Label for OpenGamma matrix algebra- See Also:
- Constant Field Values
-
COMMONS_ALGEBRA
public static final CommonsMatrixAlgebra COMMONS_ALGEBRA
-
OG_ALGEBRA
public static final OGMatrixAlgebra OG_ALGEBRA
-
-
Method Detail
-
getMatrixAlgebra
public static MatrixAlgebra getMatrixAlgebra(String algebraName)
Given a name, returns an instance of the matrix algebra calculator.- Parameters:
algebraName
- The name of the matrix algebra calculator- Returns:
- The matrix algebra calculator
- Throws:
IllegalArgumentException
- If the calculator name is null or there is no calculator for that name
-
getMatrixAlgebraName
public static String getMatrixAlgebraName(MatrixAlgebra algebra)
Given a matrix algebra calculator, returns its name.- Parameters:
algebra
- The algebra- Returns:
- The name of that calculator (null if not found)
-
-