Class CommonsMathWrapper
- java.lang.Object
-
- com.opengamma.strata.math.impl.util.CommonsMathWrapper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoubleMatrixunwrap(org.apache.commons.math3.linear.RealMatrix x)Unwraps a matrix.static DoubleArrayunwrap(org.apache.commons.math3.linear.RealVector x)Unwraps a vector.static org.apache.commons.math3.linear.RealVectorwrap(DoubleArray x)Wraps a vector.static org.apache.commons.math3.linear.RealMatrixwrap(DoubleMatrix x)Wraps a matrix.static org.apache.commons.math3.linear.RealMatrixwrapAsMatrix(DoubleArray x)Wraps a matrix.static org.apache.commons.math3.analysis.UnivariateFunctionwrapUnivariate(Function<Double,Double> f)Wraps a function.
-
-
-
Method Detail
-
wrapUnivariate
public static org.apache.commons.math3.analysis.UnivariateFunction wrapUnivariate(Function<Double,Double> f)
Wraps a function.- Parameters:
f- an OG 1-D function mapping doubles onto doubles- Returns:
- a Commons univariate real function
-
wrap
public static org.apache.commons.math3.linear.RealMatrix wrap(DoubleMatrix x)
Wraps a matrix.- Parameters:
x- an OG 2-D matrix of doubles- Returns:
- a Commons matrix
-
wrapAsMatrix
public static org.apache.commons.math3.linear.RealMatrix wrapAsMatrix(DoubleArray x)
Wraps a matrix.- Parameters:
x- an OG 1-D vector of doubles- Returns:
- a Commons matrix
-
unwrap
public static DoubleMatrix unwrap(org.apache.commons.math3.linear.RealMatrix x)
Unwraps a matrix.- Parameters:
x- a Commons matrix- Returns:
- an OG 2-D matrix of doubles
-
wrap
public static org.apache.commons.math3.linear.RealVector wrap(DoubleArray x)
Wraps a vector.- Parameters:
x- an OG vector of doubles- Returns:
- a Commons vector
-
unwrap
public static DoubleArray unwrap(org.apache.commons.math3.linear.RealVector x)
Unwraps a vector.- Parameters:
x- a Commons vector- Returns:
- an OG 1-D matrix of doubles
-
-