/** * Sets all elements equal to zero. */ public void zero() { CommonOps.fill(this, 0.0); }
/** * Sets all elements equal to zero. */ public void zero() { CommonOps.fill(this, 0.0); }
/** * <p> * Sets every element in the matrix to the specified value.<br> * <br> * a<sub>ij</sub> = value * <p> * * @param A A matrix whose elements are about to be set. Modified. * @param value The value each element will have. */ public static void set( BlockMatrix64F A , double value ) { CommonOps.fill(A, value); }
/** * <p> * Sets all the elements in this matrix equal to the specified value.<br> * <br> * a<sub>ij</sub> = val<br> * </p> * * @see CommonOps#fill(org.ejml.data.D1Matrix64F , double) * * @param val The value each element is set to. */ public void set( double val ) { CommonOps.fill(mat, val); }
/** * <p> * Sets every element in the matrix to the specified value.<br> * <br> * a<sub>ij</sub> = value * <p> * * @param A A matrix whose elements are about to be set. Modified. * @param value The value each element will have. */ public static void set( BlockMatrix64F A , double value ) { CommonOps.fill(A, value); }
/** * <p> * Sets every element in the matrix to the specified value.<br> * <br> * a<sub>ij</sub> = value * <p> * * @param A A matrix whose elements are about to be set. Modified. * @param value The value each element will have. */ public static void set( BlockMatrix64F A , double value ) { CommonOps.fill(A, value); }
public void resetAlphaTaskPriority() { CommonOps.fill(alphaTaskPriorityVector, 1.0); }
public MomentumRateCommand() { CommonOps.fill(alphaTaskPriorityVector, 1.0); }
@Override public void process() { int numRows = ((VariableInteger)A).value; int numCols = ((VariableInteger)B).value; output.matrix.reshape(numRows,numCols); CommonOps.fill(output.matrix,0); //not sure if this is necessary. Can its value every be modified? } };
@Override public void process() { int numRows = ((VariableInteger)A).value; int numCols = ((VariableInteger)B).value; output.matrix.reshape(numRows,numCols); CommonOps.fill(output.matrix,1); } };
public static DenseMatrix64F diag( DenseMatrix64F ret , int width , double ...diagEl ) { if( ret == null ) { ret = new DenseMatrix64F(width,width); } else { if( ret.numRows != width || ret.numCols != width ) throw new IllegalArgumentException("Unexpected matrix size"); CommonOps.fill(ret, 0); } for( int i = 0; i < width; i++ ) { ret.set(i,i,diagEl[i]); } return ret; }
@Override public void setAllVariablesActive() { activeVariables.reshape(originalQuadraticCostQMatrix.getNumRows(), 1); CommonOps.fill(activeVariables, 1.0); }
protected DenseMatrix64F computeReflexiveG() { DenseMatrix64F gMatrix = new DenseMatrix64F( ndims, ndims ); CommonOps.fill( gMatrix, 0 ); for ( int i = 0; i < ndims; i++ ) { gMatrix.set( i, i, stiffness ); } return gMatrix; }
@Override public void setAllVariablesActive() { activeVariables.reshape(originalQuadraticCostQMatrix.getNumRows(), 1); CommonOps.fill(activeVariables, 1.0); }
public SimpleMovingAverageFilteredYoVariable(String name, int windowSize, YoDouble yoVariableToFilter, YoVariableRegistry registry) { super(name, registry); this.yoVariableToFilter = yoVariableToFilter; this.windowSize = new YoInteger(name + "WindowSize", registry); this.windowSize.set(windowSize); previousUpdateValues.reshape(windowSize, 1); CommonOps.fill(previousUpdateValues, 0.0); }
@Override public void getQMatrix(DenseMatrix64F matrixToPack) { matrixToPack.reshape(size, size); CommonOps.fill(matrixToPack, 0.0); matrixToPack.set(2, 2, accelerationVariance.getValue() * sqrtHz); }
public SimpleMovingAverageFilteredYoVariable(String name, int windowSize, DoubleYoVariable yoVariableToFilter, YoVariableRegistry registry) { super(name, registry); this.yoVariableToFilter = yoVariableToFilter; this.windowSize = new IntegerYoVariable(name + "WindowSize", registry); this.windowSize.set(windowSize); previousUpdateValues.reshape(windowSize, 1); CommonOps.fill(previousUpdateValues, 0.0); }
@Override public void getQMatrix(DenseMatrix64F matrixToPack) { matrixToPack.reshape(getSize(), getSize()); CommonOps.fill(matrixToPack, 0.0); for (int i = 0; i < subStateList.size(); i++) { ImmutablePair<MutableInt, State> pair = subStateList.get(i); int startIndex = pair.getLeft().intValue(); State subState = pair.getRight(); subState.getQMatrix(tempMatrix); CommonOps.insert(tempMatrix, matrixToPack, startIndex, startIndex); } } }
@Override public void getRobotJacobianAndResidual(DenseMatrix64F jacobianToPack, DenseMatrix64F residualToPack, RobotState robotState) { jacobianToPack.reshape(measurementSize, robotState.getSize()); CommonOps.fill(jacobianToPack, 0.0); jacobianToPack.set(0, robotState.findJointPositionIndex(jointName), 1.0); residualToPack.reshape(measurementSize, 1); JointState jointState = robotState.getJointState(jointName); residualToPack.set(0, measurement - jointState.getQ()); }
@Override public void getQMatrix(DenseMatrix64F matrixToPack) { matrixToPack.reshape(size, size); CommonOps.fill(matrixToPack, 0.0); matrixToPack.set(angularAccelerationStart + 0, angularAccelerationStart + 0, angularAccelerationVariance.getValue() * sqrtHz); matrixToPack.set(angularAccelerationStart + 1, angularAccelerationStart + 1, angularAccelerationVariance.getValue() * sqrtHz); matrixToPack.set(angularAccelerationStart + 2, angularAccelerationStart + 2, angularAccelerationVariance.getValue() * sqrtHz); matrixToPack.set(linearAccelerationStart + 0, linearAccelerationStart + 0, linearAccelerationVariance.getValue() * sqrtHz); matrixToPack.set(linearAccelerationStart + 1, linearAccelerationStart + 1, linearAccelerationVariance.getValue() * sqrtHz); matrixToPack.set(linearAccelerationStart + 2, linearAccelerationStart + 2, linearAccelerationVariance.getValue() * sqrtHz); }