/** * Sets the value of the row, column position in the matrix. * * @param row * @param column * @param value */ @Override public void setElement(int row, int column, double value) { mat.set(row, column, value); }
public void setColumn(int column, double... values) { if (values.length != mat.getNumCols()) { throw new IllegalArgumentException( "Call setRow received an array of length " + values.length + ". " + "The dimensions of the matrix is " + mat.getNumRows() + " by " + mat.getNumCols() + "."); } for (int i = 0; i < values.length; i++) { mat.set(i, column, values[i]); } }
public void setRow(int row, double... values) { if (values.length != mat.getNumCols()) { throw new IllegalArgumentException( "Call setRow received an array of length " + values.length + ". " + "The dimensions of the matrix is " + mat.getNumRows() + " by " + mat.getNumCols() + "."); } for (int i = 0; i < values.length; i++) { mat.set(row, i, values[i]); } }
/** * Decomposes the absolute dual quadratic into the following submatrices: Q=[w -w*p;-p'*w p'*w*p] * * @see DecomposeAbsoluteDualQuadratic * * @param Q (Input) Absolute quadratic. Typically found in auto calibration. Not modified. * @param w (Output) 3x3 symmetric matrix * @param p (Output) 3x1 vector * @return true if successful or false if it failed */ public static boolean decomposeAbsDualQuadratic( DMatrix4x4 Q , DMatrix3x3 w , DMatrix3 p ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; w.set(alg.getW()); p.set(alg.getP()); return true; }
k.set(w_inv); k.a11 = Math.abs(k.a11); k.a22 = Math.abs(k.a22);