public TridiagonalDecompositionHouseholderOrig_D64() { N = 1; QT = new DenseMatrix64F(N,N); w = new double[N]; b = new double[N]; gammas = new double[N]; }
/** * Creates a new matrix that is initially set to zero with the specified dimensions. * * @see org.ejml.data.DenseMatrix64F#DenseMatrix64F(int, int) * * @param numRows The number of rows in the matrix. * @param numCols The number of columns in the matrix. */ public SimpleMatrix(int numRows, int numCols) { mat = new DenseMatrix64F(numRows, numCols); }
/** * Creates a decompose that defines the specified amount of memory. * * @param numElements number of elements in the matrix. */ public BidiagonalDecompositionRow_D64(int numElements) { UBV = new DenseMatrix64F(numElements); gammasU = new double[ numElements ]; gammasV = new double[ numElements ]; b = new double[ numElements ]; u = new double[ numElements ]; }
/** * Creates and returns a matrix which is idential to this one. * * @return A new identical matrix. */ @SuppressWarnings({"unchecked"}) public DenseMatrix64F copy() { return new DenseMatrix64F(this); }
public void setExpectedMaxSize( int numRows , int numCols ) { LU = new DenseMatrix64F(numRows,numCols); this.dataLU = LU.data; maxWidth = Math.max(numRows,numCols); vv = new double[ maxWidth ]; indx = new int[ maxWidth ]; pivot = new int[ maxWidth ]; }
public void setExpectedMaxSize( int numRows , int numCols ) { if( numRows != numCols ) { throw new IllegalArgumentException("Can only decompose square matrices"); } this.maxWidth = numRows; this.L = new DenseMatrix64F(maxWidth,maxWidth); this.el = L.data; this.vv = new double[maxWidth]; this.d = new double[maxWidth]; }
public void setExpectedMaxSize( int numRows , int numCols ) { LU = new DenseMatrix64F(numRows,numCols); this.dataLU = LU.data; maxWidth = Math.max(numRows,numCols); vv = new double[ maxWidth ]; indx = new int[ maxWidth ]; pivot = new int[ maxWidth ]; }
public DampedLeastSquaresNullspaceCalculator(int matrixSize, double alpha) { pseudoInverseSolver = new DampedLeastSquaresSolver(matrixSize, alpha); nullspaceProjector = new DenseMatrix64F(matrixSize, matrixSize); tempMatrixForProjectionInPlace = new DenseMatrix64F(matrixSize, matrixSize); }
public DampedQRNullspaceCalculator(int matrixSize, double alpha) { this.alpha = alpha; MathTools.checkIntervalContains(matrixSize, 1, Integer.MAX_VALUE); nullspaceProjector = new DenseMatrix64F(matrixSize, matrixSize); tempMatrixForProjectionInPlace = new DenseMatrix64F(matrixSize, matrixSize); linearSolver = LinearSolverFactory.symmPosDef(matrixSize); decomposer = DecompositionFactory.qr(matrixSize, matrixSize); nullspace = new DenseMatrix64F(matrixSize, matrixSize); Q = new DenseMatrix64F(matrixSize, matrixSize); R1 = new DenseMatrix64F(matrixSize, matrixSize); }
public DampedLeastSquaresSolver(int matrixSize, double alpha) { this.matrixSize = matrixSize; this.A = new DenseMatrix64F(matrixSize, matrixSize); this.tempMatrix1 = new DenseMatrix64F(matrixSize, matrixSize); this.tempMatrix2 = new DenseMatrix64F(matrixSize, 1); // this.linearSolver = LinearSolverFactory.linear(matrixSize); this.linearSolver = LinearSolverFactory.symmPosDef(matrixSize); this.linearSolverAlpha0 = new ConfigurableSolvePseudoInverseSVD(); this.alpha = alpha; }
private DenseMatrix64F getDataMatrixTransposeTimesResponse(int numVariables, DenseMatrix64F dataMatrixTranspose, DenseMatrix64F response) { DenseMatrix64F multipliedResponse = new DenseMatrix64F(numVariables,1); mult(dataMatrixTranspose, response, multipliedResponse); return multipliedResponse; }
public static DenseMatrix64F checkZeros( DenseMatrix64F A , int numRows , int numCols) { if( A == null ) { return new DenseMatrix64F(numRows,numCols); } else if( numRows != A.numRows || numCols != A.numCols ) throw new IllegalArgumentException("Input is not "+numRows+" x "+numCols+" matrix"); else A.zero(); return A; }
/** * @return a 6 x 6 matrix representing this generalized inertia in matrix form [massMomentOfInertia, crossTranspose; cross, mI] */ public DenseMatrix64F toMatrix() { DenseMatrix64F matrix = new DenseMatrix64F(6, 6); getMatrix(matrix); return matrix; }
@Override public void setMaxSize( int maxRows , int maxCols ) { // allow it some room to grow maxRows += 5; super.setMaxSize(maxRows,maxCols); update = new QrUpdate(maxRows,maxCols,true); A = new DenseMatrix64F(maxRows,maxCols); }
@Override public DenseMatrix64F getR(DenseMatrix64F R, boolean compact) { BlockMatrix64F Rblock; Rblock = ((QRDecompositionHouseholder_B64)alg).getR(null,compact); if( R == null ) { R = new DenseMatrix64F(Rblock.numRows,Rblock.numCols); } BlockMatrixOps.convert(Rblock,R); return R; }
@Override public String toString() { DenseMatrix64F mat = new DenseMatrix64F(6, 6); getMatrix(mat); return mat.toString(); }
protected void init(DenseMatrix64F A) { m = A.numRows; n = A.numCols; min = Math.min(m,n); U = SimpleMatrix.identity(m); B = new SimpleMatrix(A); V = SimpleMatrix.identity(n); int max = Math.max(m,n); u = new DenseMatrix64F(max,1); }
public static void setGeoregressionTransformFromVecmath(RigidBodyTransform vecmathTransform, Se3_F64 georegressionTransform) { double[] m1 = new double[16]; vecmathTransform.get(m1); double[][] rot = new double[][] { {m1[0], m1[1], m1[2]}, {m1[4], m1[5], m1[6]}, {m1[8], m1[9], m1[10]} }; DenseMatrix64F denseMatrix64F = new DenseMatrix64F(rot); georegressionTransform.setRotation(denseMatrix64F); georegressionTransform.setTranslation(m1[3], m1[7], m1[11]); }
private static DenseMatrix64F computeMinor(DenseMatrix64F mat, int i, int j) { int m = mat.getNumRows(); int n = mat.getNumCols(); DenseMatrix64F ret = new DenseMatrix64F(m - 1, n - 1); int[] rows = determineIndices(i, m); int[] columns = determineIndices(j, n); MatrixTools.getMatrixBlock(ret, mat, rows, columns); return ret; }
public DesiredJointAccelerationCalculatorOld(GeometricJacobian jacobian, JacobianSolver jacobianSolver) { this.jointAccelerations = new DenseMatrix64F(ScrewTools.computeDegreesOfFreedom(jacobian.getJointsInOrder()), 1); this.sign = ScrewTools.isAncestor(jacobian.getEndEffector(), jacobian.getBase()) ? 1 : -1; // because the sign of a joint acceleration changes when you switch a joint's 'direction' in the chain this.jacobian = jacobian; this.jacobianSolver = jacobianSolver; }