/** * Sets all the elements in the matrix equal to zero. * * @see CommonOps#fill(org.ejml.data.D1Matrix64F , double) */ public void zero() { mat.zero(); }
/** * Sets all the elements in the matrix equal to zero. * * @see CommonOps#fill(org.ejml.data.D1Matrix64F , double) */ public void zero() { mat.zero(); }
/** * Sets all the elements in the matrix equal to zero. * * @see CommonOps#fill(org.ejml.data.D1Matrix64F , double) */ public void zero() { mat.zero(); }
private void updateMassMatrix() { if (isMassMatrixUpToDate) return; massMatrix.zero(); rootCompositeInertia.computeMassMatrix(); isMassMatrixUpToDate = true; }
/** * Clear the current data. * If the mean of the next dataset is somewhat known, it is preferable to use {@link #clearAndSetPredictedMean(Tuple3DBasics)}. */ public void clear() { sampleSize = 0; mean.set(0.0, 0., 0.0); secondMoment.zero(); }
/** * Clear the current data. * If the mean of the next dataset is somewhat known, it is preferable to use {@link #clearAndSetPredictedMean(Tuple3d)}. */ public void clear() { sampleSize = 0; mean.set(0.0, 0., 0.0); secondMoment.zero(); }
protected void setFootstepWeight(int footstepIndex, double xWeight, double yWeight) { xWeight = Math.max(minimumFootstepWeight, xWeight); yWeight = Math.max(minimumFootstepWeight, yWeight); identity.zero(); identity.set(0, 0, xWeight); identity.set(1, 1, yWeight); MatrixTools.setMatrixBlock(footstepWeights.get(footstepIndex), 0, 0, identity, 0, 0, 2, 2, 1.0); }
@Override public void clear() { desiredPosition.setToNaN(ReferenceFrame.getWorldFrame()); selectionMatrix.resetSelection(); weightVector.zero(); }
private void organizeDataInSelectionMatrix(DenseMatrix64F selectionMatrix, double[] data) { selectionMatrix.reshape(6, 6); selectionMatrix.zero(); for (int i = 0; i < 6; i++) { selectionMatrix.set(i, i, data[i]); } MatrixTools.removeZeroRows(selectionMatrix, 1.0e-5); }
public void reset() { for (int i = 0; i < numberOfDoFs; i++) regularizationMatrix.set(i, i, jointAccelerationRegularization.getDoubleValue()); solverInput_H.zero(); solverInput_f.zero(); solverInput_Aeq.reshape(0, problemSize); solverInput_beq.reshape(0, 1); if (!firstCall.getBooleanValue()) addJointJerkRegularization(); }
protected void addFeedbackTask() { MatrixTools.setMatrixBlock(feedbackCost_H, 0, 0, feedbackWeight, 0, 0, 2, 2, 1.0); feedbackCost_h.zero(); MatrixTools.addMatrixBlock(solverInput_H, feedbackCMPIndex, feedbackCMPIndex, feedbackCost_H, 0, 0, 2, 2, 1.0); MatrixTools.addMatrixBlock(solverInput_h, feedbackCMPIndex, 0, feedbackCost_h, 0, 0, 2, 1, 1.0); }
public void setSelectionMatrixForPlanarLinearControl() { selectionMatrix.reshape(2, Twist.SIZE); selectionMatrix.zero(); selectionMatrix.set(0, 3, 1.0); selectionMatrix.set(1, 5, 1.0); }
public void setSelectionMatrixForAngularControl() { selectionMatrix.reshape(3, Twist.SIZE); selectionMatrix.zero(); selectionMatrix.set(0, 0, 1.0); selectionMatrix.set(1, 1, 1.0); selectionMatrix.set(2, 2, 1.0); }
public void setSelectionMatrixForPlanarControl() { selectionMatrix.reshape(3, Twist.SIZE); selectionMatrix.zero(); selectionMatrix.set(0, 1, 1.0); selectionMatrix.set(1, 3, 1.0); selectionMatrix.set(2, 5, 1.0); }
public void setSelectionMatrixForLinearControl() { selectionMatrix.reshape(3, Twist.SIZE); selectionMatrix.zero(); selectionMatrix.set(0, 3, 1.0); selectionMatrix.set(1, 4, 1.0); selectionMatrix.set(2, 5, 1.0); }
public void setSelectionMatrixForAngularControl() { selectionMatrix.reshape(3, Twist.SIZE); selectionMatrix.zero(); selectionMatrix.set(0, 0, 1.0); selectionMatrix.set(1, 1, 1.0); selectionMatrix.set(2, 2, 1.0); }
public void packInverse(LinearSolver<DenseMatrix64F> solver, DenseMatrix64F matrixToPack) { matrixToPack.zero(); for(int i=0;i<blockSizes.length;i++) { tmpMatrix[i].reshape(blockSizes[i] , blockSizes[i]); packBlock(tmpMatrix[i], i, 0, 0); solver.setA(tmpMatrix[i]); solver.invert(tmpMatrix[i]); setBlock(tmpMatrix[i] ,i, matrixToPack); } }
public void packInverse(LinearSolver<DenseMatrix64F> solver, DenseMatrix64F matrixToPack) { matrixToPack.zero(); for(int i=0;i<blockSizes.length;i++) { tmpMatrix[i].reshape(blockSizes[i] , blockSizes[i]); packBlock(tmpMatrix[i], i, 0, 0); solver.setA(tmpMatrix[i]); solver.invert(tmpMatrix[i]); setBlock(tmpMatrix[i] ,i, matrixToPack); } }
protected void addFeedbackRegularizationTask() { MatrixTools.setMatrixBlock(feedbackRegularizationCost_H, 0, 0, feedbackRegularizationWeight, 0, 0, 2, 2, 1.0); tmpObjective.zero(); tmpObjective.set(previousFeedbackDeltaSolution); CommonOps.mult(feedbackRegularizationWeight, tmpObjective, tmpObjective); CommonOps.multTransA(previousFeedbackDeltaSolution, tmpObjective, feedbackRegularizationResidualCost); MatrixTools.setMatrixBlock(feedbackRegularizationCost_h, 0, 0, tmpObjective, 0, 0, 2, 1, 1.0); CommonOps.addEquals(solverInputResidualCost, feedbackRegularizationResidualCost); MatrixTools.addMatrixBlock(solverInput_H, numberOfFootstepVariables, numberOfFootstepVariables, feedbackRegularizationCost_H, 0, 0, feedbackCMPIndex, feedbackCMPIndex, 1.0); MatrixTools.addMatrixBlock(solverInput_h, numberOfFootstepVariables, 1, feedbackRegularizationCost_h, 0, 0, feedbackCMPIndex, 1, 1.0); }