3 import org.apache.commons.math.linear.Array2DRowRealMatrix;
4 import org.apache.commons.math.linear.ArrayRealVector;
5 import org.apache.commons.math.linear.RealMatrix;
6 import org.apache.commons.math.linear.RealVector;
20 private RealMatrix matrices;
25 return coeffs.isTimeDependent();
29 this.matrices = matrices;
31 this.rowsize = rowsize;
43 public RealMatrix
compose(
double t,
double[] mu) {
44 double[] c = coeffs.evaluateCoefficients(t, mu);
45 RealVector comp =
new ArrayRealVector(matrices.operate(c));
46 int cols = comp.getDimension() / this.rowsize;
47 Array2DRowRealMatrix res =
new Array2DRowRealMatrix(rowsize, cols);
48 for (
int i = 0; i < cols; i++) {
49 RealVector tmp = comp.getSubVector(i * rowsize, rowsize);
50 res.setColumnVector(i, tmp);
RealMatrix compose(double t, double[] mu)
Performs the composition of the affine matrix given a time t and parameter .
boolean isTimeDependent()
Base class for implementation of a series of time/parameter-dependent affine coefficients.
AffParamMatrix(RealMatrix matrices, int rowsize, IAffineCoefficients coeffs)
Affine parametric matrix class.