public ActiveSearchOptimizationSettings(double epsilonConstraintActive, int maxIterations, boolean useSVD) { this.epsilonConstraintActive = epsilonConstraintActive; this.maxIterations = maxIterations; this.linearSolver = LinearSolverFactory.pseudoInverse(useSVD); }
public ActiveSearchOptimizationSettings(double epsilonConstraintActive, int maxIterations, boolean useSVD) { this.epsilonConstraintActive = epsilonConstraintActive; this.maxIterations = maxIterations; this.linearSolver = LinearSolverFactory.pseudoInverse(useSVD); }
public DampedLeastSquaresSolver(int matrixSize, double alpha) { 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 = LinearSolverFactory.pseudoInverse(true); this.alpha = alpha; }
/** * <p> * Computes the Moore-Penrose pseudo-inverse:<br> * <br> * pinv(A) = (A<sup>T</sup>A)<sup>-1</sup> A<sup>T</sup><br> * or<br> * pinv(A) = A<sup>T</sup>(AA<sup>T</sup>)<sup>-1</sup><br> * </p> * <p> * Internally it uses {@link org.ejml.alg.dense.linsol.svd.SolvePseudoInverseSvd} to compute the inverse. For performance reasons, this should only * be used when a matrix is singular or nearly singular. * </p> * @param A A m by n Matrix. Not modified. * @param invA Where the computed pseudo inverse is stored. n by m. Modified. * @return */ public static void pinv( DenseMatrix64F A , DenseMatrix64F invA ) { LinearSolver<DenseMatrix64F> solver = LinearSolverFactory.pseudoInverse(true); if( solver.modifiesA()) A = A.copy(); if( !solver.setA(A) ) throw new IllegalArgumentException("Invert failed, maybe a bug?"); solver.invert(invA); }
/** * <p> * Computes the Moore-Penrose pseudo-inverse:<br> * <br> * pinv(A) = (A<sup>T</sup>A)<sup>-1</sup> A<sup>T</sup><br> * or<br> * pinv(A) = A<sup>T</sup>(AA<sup>T</sup>)<sup>-1</sup><br> * </p> * <p> * Internally it uses {@link org.ejml.alg.dense.linsol.svd.SolvePseudoInverseSvd} to compute the inverse. For performance reasons, this should only * be used when a matrix is singular or nearly singular. * </p> * @param A A m by n Matrix. Not modified. * @param invA Where the computed pseudo inverse is stored. n by m. Modified. * @return */ public static void pinv( DenseMatrix64F A , DenseMatrix64F invA ) { LinearSolver<DenseMatrix64F> solver = LinearSolverFactory.pseudoInverse(true); if( solver.modifiesA()) A = A.copy(); if( !solver.setA(A) ) throw new IllegalArgumentException("Invert failed, maybe a bug?"); solver.invert(invA); }
/** * <p> * Computes the Moore-Penrose pseudo-inverse:<br> * <br> * pinv(A) = (A<sup>T</sup>A)<sup>-1</sup> A<sup>T</sup><br> * or<br> * pinv(A) = A<sup>T</sup>(AA<sup>T</sup>)<sup>-1</sup><br> * </p> * <p> * Internally it uses {@link org.ejml.alg.dense.linsol.svd.SolvePseudoInverseSvd} to compute the inverse. For performance reasons, this should only * be used when a matrix is singular or nearly singular. * </p> * @param A A m by n Matrix. Not modified. * @param invA Where the computed pseudo inverse is stored. n by m. Modified. * @return */ public static void pinv( DenseMatrix64F A , DenseMatrix64F invA ) { LinearSolver<DenseMatrix64F> solver = LinearSolverFactory.pseudoInverse(true); if( solver.modifiesA()) A = A.copy(); if( !solver.setA(A) ) throw new IllegalArgumentException("Invert failed, maybe a bug?"); solver.invert(invA); }
public OriginalDynamicallyConsistentNullspaceCalculator(FloatingJointBasics rootJoint, boolean computeSNsBar) { this.rootJoint = rootJoint; this.massMatrixCalculator = new CompositeRigidBodyMassMatrixCalculator(rootJoint.getSuccessor()); jointsInOrder = massMatrixCalculator.getInput().getJointMatrixIndexProvider().getIndexedJointsInOrder().toArray(new JointBasics[0]); this.nDegreesOfFreedom = MultiBodySystemTools.computeDegreesOfFreedom(jointsInOrder); massMatrixSolver = LinearSolverFactory.symmPosDef(nDegreesOfFreedom); lambdaSolver = LinearSolverFactory.symmPosDef(nDegreesOfFreedom); // size of matrix is only used to choose algorithm. nDegreesOfFreedom is an upper limit pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); this.computeSNsBar = computeSNsBar; }
public OriginalDynamicallyConsistentNullspaceCalculator(FloatingInverseDynamicsJoint rootJoint, boolean computeSNsBar) { this.rootJoint = rootJoint; this.massMatrixCalculator = new CompositeRigidBodyMassMatrixCalculator(rootJoint.getSuccessor()); jointsInOrder = massMatrixCalculator.getJointsInOrder(); this.nDegreesOfFreedom = ScrewTools.computeDegreesOfFreedom(jointsInOrder); massMatrixSolver = LinearSolverFactory.symmPosDef(nDegreesOfFreedom); lambdaSolver = LinearSolverFactory.symmPosDef(nDegreesOfFreedom); // size of matrix is only used to choose algorithm. nDegreesOfFreedom is an upper limit pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); this.computeSNsBar = computeSNsBar; }
solver = LinearSolverFactory.pseudoInverse( false );
spatialAccelerationCommand.setWeight(random.nextDouble()); LinearSolver<DenseMatrix64F> pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); DenseMatrix64F desiredJointAccelerations = new DenseMatrix64F(numberOfDoFs, 1);
LinearSolver<DenseMatrix64F> pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); DenseMatrix64F jInverse = new DenseMatrix64F(numberOfDoFs, 6); MotionQPInputCalculator motionQPInputCalculator = toolbox.getMotionQPInputCalculator();
LinearSolver<DenseMatrix64F> linearSolver = LinearSolverFactory.pseudoInverse(true);
LinearSolver<DenseMatrix64F> pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); DenseMatrix64F jInverse = new DenseMatrix64F(numberOfDoFs, 6); MotionQPInputCalculator motionQPInputCalculator = toolbox.getMotionQPInputCalculator();
double alpha = RandomNumbers.nextDouble(random, 0.01, 2.0); nullspaceCalculator.setPseudoInverseAlpha(alpha); LinearSolver<DenseMatrix64F> linearSolver = LinearSolverFactory.pseudoInverse(true);
LinearSolver<DenseMatrix64F> pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); DenseMatrix64F jInverse = new DenseMatrix64F(numberOfDoFs, 6); MotionQPInputCalculator motionQPInputCalculator = toolbox.getMotionQPInputCalculator();
LinearSolver<DenseMatrix64F> pseudoInverseSolver = LinearSolverFactory.pseudoInverse(true); DenseMatrix64F jInverse = new DenseMatrix64F(numberOfDoFs, 6); MotionQPInputCalculator motionQPInputCalculator = toolbox.getMotionQPInputCalculator();