basic_algebra.c File Reference IntroductionDefinition of the basic lineal algebra routines used in the CuikSuite. These basic routines are implemented using BLAS, if available. Definition in file basic_algebra.c.
Function Documentation◆ ClearVector()
Sets a vector to 0.
Definition at line 16 of file basic_algebra.c. ◆ VectorAnd()Generates a vector with the 'and' of two vectors of flags.
Definition at line 21 of file basic_algebra.c. Referenced by DynamicStepResidue(), and GetPositionJacobian(). ◆ VectorOr()Generates a vector with the 'or' of two vectors of flags.
Definition at line 29 of file basic_algebra.c. ◆ GeneralDotProduct()
Computes the dot product of two general vectors.
Definition at line 37 of file basic_algebra.c. Referenced by AtlasRRTValidateSample(), BroydenUpdateJacobian(), CutPolytopeWithFace(), DetermineSPolytopeNeighbour(), EnlargeSPolytope(), GradientSmooth(), InsidePolytope(), InsideSPolytope(), LQRComputePolicy(), LQRComputePolicy_t(), MatrixWeigthedDotProduct(), MechEnergy(), PolytopeBoundaryPointFromExternalCornerInt(), RefineSingularPoint(), SAVxSAV(), StepEffort(), StepEffortGradient(), and Time2Go(). ◆ MatrixWeigthedDotProduct()
Computes weighted the dot product of two general vectors.
Definition at line 52 of file basic_algebra.c. References GeneralDotProduct(), and RC2INDEX. ◆ ScaleVector()
Multiplies all the elements of a vector by a given factor.
Definition at line 72 of file basic_algebra.c. Referenced by AddBranchToRRT(), CDCallBackInfo(), ComputeAcceleration(), ComputeC(), ConnectDynamicStatesID(), ConnectSamplesChart(), DetermineSPolytopeNeighbour(), DistanceOnChart(), EvaluateMEquationXVectors(), ExtendAtlasFromPoint(), ExtendAtlasTowardPoint(), FocusedPointOnBoundary(), GetConnectionLinkWrench(), GradientSmooth(), HandC(), InitHandC(), LinearizeDynamics(), MechEnergy(), MinimizeOnAtlas(), NewChartFromPoint(), PathInChart(), PlotForceField(), PolytopeBoundaryPointFromExternalCornerInt(), rbi2mci(), scaleSAM(), scaleSAV(), StepDispersionGradient(), StepEffort(), StepEffortGradient(), StepLengthGradient(), and TriangulateAtlas(). ◆ ScaleVector2()
Multiplies all the elements of a vector by a given factor and stores the result in a new vector.
Definition at line 84 of file basic_algebra.c. Referenced by EvaluateTrans(). ◆ OffsetVector()
Adds a constant to all the elements of a vector.
Definition at line 97 of file basic_algebra.c. ◆ AccumulateVector()
Adds a vector to another vector
Definition at line 105 of file basic_algebra.c. Referenced by accumSAM(), accumSAV(), AccumulateMatrix(), AddBranchToRRT(), BroydenUpdateJacobian(), ConnectSamplesChart(), dG(), dr(), EvaluateMEquationXVectors(), EvaluateTrans(), InitPatchTrans(), Local2Global(), NextDynamicState(), PolytopeBoundaryPointFromExternalCornerInt(), and PrintTransSeq(). ◆ SumVector()
Adds two vectors and stores the result in another vector..
Definition at line 117 of file basic_algebra.c. Referenced by body2SDF(), Chart2Manifold(), CombineGradients(), DynamicStepResidue(), GetJointTransSeq(), Local2Global(), LQRComputePolicy_t(), main(), NextDynamicStateLocalRK4(), NextDynamicStateRK4(), PrintJoint(), PrintTransSeq(), sumSAM(), and sumSAV(). ◆ SumVectorScale()
Adds two vectors /scaling the second vector) and stores the result in another vector.. This is basically used in Gram-Smidth orthogonalization.
Definition at line 136 of file basic_algebra.c. Referenced by AddBranchToRRT(), ConnectSamples(), ConnectSamplesChart(), CuikGradientInBox(), DynamicStepResidue(), EvaluateTrans(), EvaluateVectorsPATrans(), FindPointInOtherBranch(), FindSingularPoint(), GeodesicDistance(), GetJointBasicTransform(), GetJointDOFValues(), GetJointTransform(), HandC(), InitWorldFromMolecule(), LQRComputePolicy(), LQRComputePolicy_t(), NewTemptativeSample(), NewTriangularPrism(), NextDynamicState(), NextDynamicStateEuler(), NextDynamicStateLocalEuler(), NextDynamicStateLocalRK4(), NextDynamicStateRK4(), PointTowardRandSample(), StepDispersionGradient(), StepEffortGradient(), and StepLengthGradient(). ◆ CosVector()
Compputes the cosine for all the elements of a vector.
Definition at line 160 of file basic_algebra.c. ◆ SinVector()
Compputes the sine for all the elements of a vector.
Definition at line 168 of file basic_algebra.c. ◆ AddVectorElements()
Adds all the elements of a vector.
Definition at line 176 of file basic_algebra.c. ◆ AddVectorPositiveElements()
Adds all the positive elements of a vector.
Definition at line 189 of file basic_algebra.c. Referenced by main(). ◆ MaxVectorElement()
Returns the index of the maximum element in the given vector.
Definition at line 202 of file basic_algebra.c. References NO_UINT. ◆ MaxVector()
Returns the value of the maximum element in the given vector.
Definition at line 226 of file basic_algebra.c. Referenced by ErrorInInequalities(), ErrorInSimpInequalitiesOnPoint(), InequalitiesHoldOnPoint(), InitBTree(), and SimpInequalitiesHoldOnPoint(). ◆ MinVectorElement()
Returns the index of the minimum element in the given vector.
Definition at line 245 of file basic_algebra.c. References NO_UINT. ◆ MinVector()
Returns the value of the minimum element in the given vector.
Definition at line 269 of file basic_algebra.c. ◆ Vector2Range()
Scales a vector so that their values span a given range.
Definition at line 288 of file basic_algebra.c. Referenced by main(). ◆ SubtractVector()
Subtracts a vector from another vector: v1=v1-v2
Definition at line 329 of file basic_algebra.c. Referenced by AtlasRRTValidateSample(), ComputeHandC_FJH(), ComputeInverseDynamics(), LinearizeDynamics(), LQRComputePolicy_t(), PolytopeBoundaryPointFromExternalCornerInt(), and SubtractMatrix(). ◆ DifferenceVector()
Subtracts two vectors and stores the result in another vector: v=v1-v2
Definition at line 342 of file basic_algebra.c. Referenced by AdjustBioWorldGeometry(), Atoms2Transforms(), axis2SDF(), body2SDF(), BroydenUpdateJacobian(), ConnectSamplesChart(), DifferenceVectorSubset(), DifferenceVectorTopology(), DynamicStepResidue(), FindSingularPoint(), GetConnectionLinkPotentialEnergy(), GetConnectionLinkWrench(), GetJointDOFValues(), GetTransform2ConnectionLink(), InitPatchTrans(), InitWorldFromMolecule(), Manifold2Chart(), NewTriangularPrism(), PointTowardRandSample(), StepEffort(), StepEffortGradient(), Time2Go(), and TriangulateAtlas(). ◆ DifferenceVectorSubset()
Subtracts two vectors and stores the result in another vector: v=v1-v2 Only the selected components are operated. The rest are set to 0.
Definition at line 364 of file basic_algebra.c. References DifferenceVector(). Referenced by DifferenceVectorTopologySubset(). ◆ DifferenceVectorTopology()
Subtracts two vectors and stores the result in another vector considering the topology for each component.
Definition at line 384 of file basic_algebra.c. References DifferenceVector(), PI2PI, and TOPOLOGY_S. Referenced by AddBranchToRRT(), Chart2Manifold(), ConnectSamples(), ConnectSamplesChart(), DifferenceVectorTopologySubset(), GeodesicDistance(), and Manifold2Chart(). ◆ DifferenceVectorTopologySubset()
Subtracts two vectors and stores the result in another vector considering the topology for the selected components. The output for the non-selected components are set to 0.
Definition at line 403 of file basic_algebra.c. References DifferenceVectorSubset(), DifferenceVectorTopology(), PI2PI, and TOPOLOGY_S. Referenced by StepDispersionGradient(), StepEffort(), StepEffortGradient(), and StepLengthGradient(). ◆ Norm()
Computes the norm of a vector with the given size.
Definition at line 434 of file basic_algebra.c. Referenced by AddBorderConstraint(), AddBranchToAtlasRRT(), AddBranchToRRT(), ApplyLinkRot(), ApplyLinkRotAxisX(), ApplyLinkRotDeformX(), AtlasRRTSample(), AtlasRRTValidateSample(), body2SDF(), BroydenStep(), CDCallBackInfo(), Chart2Manifold(), ConnectSamples(), ConnectSamplesChart(), CuikGradientInBox(), CuikNewtonInBox(), CutPolytope(), CutPolytopeWithFace(), CutSPolytope(), DetermineSPolytopeNeighbour(), DistanceOnChart(), DynamicStepResidue(), ErrorInCSEquations(), ErrorInSimpCSEquations(), ErrorInSolution(), EvaluateTrans(), ExtendAtlasFromPoint(), ExtendAtlasTowardPoint(), GetConnectionLinkPotentialEnergy(), GetConnectionLinkWrench(), GetJointDOFValues(), GetPolytopeInteriorPoint(), GetTransform2ConnectionLink(), InsideSPolytope(), LQRComputePolicy_t(), main(), Manifold2Chart(), MatrixWeightedNorm(), MinCosinusBetweenSubSpaces(), MinimizeOnAtlas(), NewChartFromPoint(), NewFixJoint(), NewInPatchJoint(), NewPrismaticJoint(), NewRevoluteJoint(), NewSphericalJoint(), NewTemptativeSample(), Newton2ManifoldPlane(), NewUniversalJoint(), NextDynamicState(), NextDynamicStateEuler(), NextDynamicStateLocalEuler(), NextDynamicStateLocalRK4(), NextDynamicStateRK4(), Normalize(), PathInChart(), PlotForceField(), PointTowardRandSample(), PolytopeBoundaryPointFromExternalCornerInt(), ReconstructAtlasPath(), RefineSingularPoint(), StepDispersionGradient(), StepEffort(), StepEffortGradient(), StepLengthGradient(), Time2Go(), and WeightedNorm(). ◆ WeightedNorm()
Computes the weighted norm of a vector with the given size.
Definition at line 449 of file basic_algebra.c. References Norm(). ◆ MatrixWeightedNorm()
The same as WeightedNorm but here the weights is given in the form of a matrix. Thus, were we compute v^T*W*v.
Definition at line 465 of file basic_algebra.c. ◆ NormWithStride()
Computes the norm of a vector with the given size and whose elements might not be continuous in memory but separated by a given stride.
Definition at line 485 of file basic_algebra.c. ◆ SquaredDistance()
Computes the distance between two points given as a vector with a given size.
Definition at line 502 of file basic_algebra.c. Referenced by Distance(), MatrixWeightedSquaredDistance(), SquaredDistanceSubset(), SquaredDistanceTopology(), and WeightedSquaredDistance(). ◆ WeightedSquaredDistance()
Computes the weighted distance between two points given as a vector with a given size.
Definition at line 518 of file basic_algebra.c. References SquaredDistance(). Referenced by WeightedDistance(), WeightedSquaredDistanceSubset(), and WeightedSquaredDistanceTopology(). ◆ MatrixWeightedSquaredDistance()
The same as WeightedSquaredDistance, but the weights are given in the form of a matrix. Thus, we compute (v2-v1)^t * W * (v2-v1). WeightedSquaredDistance can be seen as a particular case of this function where matrix W is diagonal.
Definition at line 539 of file basic_algebra.c. References RC2INDEX, and SquaredDistance(). Referenced by MatrixWeightedDistance(), and MatrixWeightedSquaredDistanceSubset(). ◆ SquaredDistanceSubset()
Computes the distance between two points given as a vector with a given size along some of its components.
Definition at line 565 of file basic_algebra.c. References SquaredDistance(). Referenced by MatrixWeightedSquaredDistanceSubset(), SquaredDistanceTopologySubset(), and WeightedSquaredDistanceSubset(). ◆ WeightedSquaredDistanceSubset()
Computes the weighted distance between two points given as a vector with a given size along some of its components.
Definition at line 589 of file basic_algebra.c. References SquaredDistanceSubset(), and WeightedSquaredDistance(). Referenced by WeightedSquaredDistanceTopologySubset(). ◆ MatrixWeightedSquaredDistanceSubset()
Computes the weighted distance between two points given as a vector with a given size along some of its components.
Definition at line 618 of file basic_algebra.c. References MatrixWeightedSquaredDistance(), RC2INDEX, and SquaredDistanceSubset(). ◆ Distance()
Computes the distance between two points given as a vector with a given size.
Definition at line 656 of file basic_algebra.c. References SquaredDistance(). Referenced by AddBranchToAtlasRRT(), AdjustBioWorldGeometry(), BioWorldRMSE(), CrossTopologyBorder(), DetermineChartNeighbours(), DistanceOnChart(), HTransformIsIdentity(), HTransformIsZero(), main(), NewTemptativeSample(), PathInChart(), ReadSTL(), ReadTwoSamples(), SimplifyPolyhedron(), and UpdateLQRPolicy(). ◆ WeightedDistance()
Computes the weighted distance between two points given as a vector with a given size.
Definition at line 661 of file basic_algebra.c. References WeightedSquaredDistance(). ◆ MatrixWeightedDistance()
The same as WeightedDistance but the weights are given in matrix form. Thus, the computation is: (v2-v1)^t * W * (v2-v1)
Definition at line 666 of file basic_algebra.c. References MatrixWeightedSquaredDistance(). ◆ SquaredDistanceTopology()
Computes the squared distance between two points given as a vector with a given size and considering the topology for each dimension.
Definition at line 671 of file basic_algebra.c. References M_PI, PI2PI, SquaredDistance(), and TOPOLOGY_S. Referenced by DistanceTopology(), SquaredDistanceTopologySubset(), and WeightedSquaredDistanceTopology(). ◆ WeightedSquaredDistanceTopology()
Computes the squared distance between two points given as a vector with a given size and considering the topology for each dimension.
Definition at line 696 of file basic_algebra.c. References M_PI, PI2PI, SquaredDistanceTopology(), TOPOLOGY_S, and WeightedSquaredDistance(). Referenced by WeightedDistanceTopology(), and WeightedSquaredDistanceTopologySubset(). ◆ SquaredDistanceTopologyMin()
Computes the squared distance between two points given as a vector with a given size and considering the topology for each dimension. The squared distance is only fully computed for points closer than a given threshold. This accelerates the distance computations.
Definition at line 727 of file basic_algebra.c. References M_PI, PI2PI, and TOPOLOGY_S. Referenced by DistanceTopologyMin(), HaveChartAtPoint(), and WeightedSquaredDistanceTopologyMin(). ◆ WeightedSquaredDistanceTopologyMin()
Computes the squared distance between two points given as a vector with a given size and considering the topology for each dimension. The squared distance is only fully computed for points closer than a given threshold. This accelerates the distance computations.
Definition at line 759 of file basic_algebra.c. References M_PI, PI2PI, SquaredDistanceTopologyMin(), and TOPOLOGY_S. Referenced by WeightedDistanceTopologyMin(). ◆ DistanceTopology()
Computes the distance between two points given as a vector with a given size and considering the topology for each components.
Definition at line 795 of file basic_algebra.c. References SquaredDistanceTopology(). Referenced by AddBranchToAtlasDynamicRRT(), AddBranchToAtlasRRT(), AddBranchToRRT(), AddNodeToRRT(), AddSample2AtlasRRT(), AddStepToRRTstar(), ApproachState(), AtlasAStar(), AtlasBiRRTstar(), AtlasGBF(), AtlasRRT(), AtlasRRTstar(), AtlasRRTValidateSample(), BiRRTstar(), BuildAtlasFromPoint(), cBiRRT(), ccRRT(), ccTRRT(), Chart2Manifold(), ChartErrorFromParameters(), ClassifyPointInChart(), ConnectDynamicStates(), ConnectDynamicStatesID(), ConnectSamples(), ConnectSamplesChart(), CrossTopologyBorder(), DistanceOnChart(), FindPointInOtherBranch(), GeodesicDistance(), GradientSmooth(), InDynamicDomain(), InitBranchState(), IntersectChartsInt(), kinobiRRT(), kinoEST(), kinoRRT(), NewTemptativeSample(), NumericIntegration(), PathInChart(), PathStart2GoalInRRT(), PointOnChart(), RecursiveReWireRRTstar(), RRTPathLength(), RRTstar(), RRTValidateSample(), and Steps2PathinRRT(). ◆ WeightedDistanceTopology()
Computes the distance between two points given as a vector with a given size and considering the topology for each components.
Definition at line 801 of file basic_algebra.c. References WeightedSquaredDistanceTopology(). Referenced by AddBranchToAtlasDynamicRRT(), AddBranchToAtlasRRT(), AddBranchToRRT(), InitBranchState(), and PathStart2GoalInRRT(). ◆ SquaredDistanceTopologySubset()
Computes the squared distance between two points given as a vector with a given size and considering the topology for the selected components.
Definition at line 807 of file basic_algebra.c. References M_PI, PI2PI, SquaredDistanceSubset(), SquaredDistanceTopology(), and TOPOLOGY_S. Referenced by DistanceTopologySubset(), and WeightedSquaredDistanceTopologySubset(). ◆ WeightedSquaredDistanceTopologySubset()
Computes the squared weighted distance between two points given as a vector with a given size and considering the topology for the selected components.
Definition at line 840 of file basic_algebra.c. References M_PI, PI2PI, SquaredDistanceTopologySubset(), TOPOLOGY_S, WeightedSquaredDistanceSubset(), and WeightedSquaredDistanceTopology(). Referenced by WeightedDistanceTopologySubset(). ◆ DistanceTopologySubset()
Computes the distance between two points given as a vector with a given size and considering the topology for the selected components.
Definition at line 878 of file basic_algebra.c. References SquaredDistanceTopologySubset(). Referenced by ConnectSamples(), ConnectSamplesChart(), PathLength(), StepDispersion(), StepDispersionGradient(), and StepLength(). ◆ WeightedDistanceTopologySubset()
Computes the distance between two points given as a vector with a given size and considering the topology for the selected components.
Definition at line 885 of file basic_algebra.c. References WeightedSquaredDistanceTopologySubset(). ◆ DistanceTopologyMin()
This is like DistanceTopology, but it only computes the distance as far it is below a given threshold. This is usefuls to rapidly abort computing distances for points that are further away than other points when searching for nearest neighbours. Note that if the output is above the given threshold, the distance is not actually fully computed (the output is not the true distance between the given points).
Definition at line 892 of file basic_algebra.c. References SquaredDistanceTopologyMin(). Referenced by GetRRTNNInChart(). ◆ WeightedDistanceTopologyMin()
This is like DistanceTopologyMin, but including weights in each dimension.
Definition at line 898 of file basic_algebra.c. References WeightedSquaredDistanceTopologyMin(). Referenced by GetRRTNN(), GetRRTNNInBall(), GetRRTNNInBranch(), and PointInRRT(). ◆ CrossTopologyBorder()
Checks if the shortest line connecting two points crosses the borders imposed by the topology of each variable, i.e., if it goes across the pi,-pi discontinuity.
Definition at line 904 of file basic_algebra.c. References Distance(), and DistanceTopology(). Referenced by TriangulateAtlas(). ◆ Normalize()
Normalizes a generic vector with the given size.
Definition at line 909 of file basic_algebra.c. References Error(), and Norm(). Referenced by Atoms2Transforms(), axis2SDF(), body2SDF(), EvaluatePATrans(), GetJointBasicTransform(), GetJointDOFValues(), GetJointTransform(), GetTransform2ConnectionLink(), GetTransform2LinkAxisX(), NewTriangularPrism(), and PointTowardRandSample(). ◆ Mean()
Computes the mean of an array of doubles.
Definition at line 933 of file basic_algebra.c. Referenced by PrintAverages(). ◆ StdDev()
Computes the sample standard deviation of an array of doubles.
Definition at line 945 of file basic_algebra.c. Referenced by PrintAverages(). ◆ ArrayPi2Pi()
Applies PI2PI to an array but only to those elements that have sphere topology.
Definition at line 963 of file basic_algebra.c. References PI2PI, and TOPOLOGY_S. Referenced by AddChart2Btree(), AddNodeToRRT(), Chart2Manifold(), ConnectSamples(), ConnectSamplesChart(), CuikGradientInBox(), CuikNewtonInBox(), CuikNewtonSimp(), InitChartInt(), Local2Global(), Manifold2Chart(), Newton2ManifoldPlane(), RefineSingularPoint(), and SearchInBtree(). ◆ GetRow()
Defines a vector taking the values from the row of a matrix.
Definition at line 976 of file basic_algebra.c. References RC2INDEX. ◆ GetColumn()
Defines a vector taking the values from the column of a matrix.
Definition at line 988 of file basic_algebra.c. References RC2INDEX. Referenced by FindRightNullVector(), HandC(), and RefineSingularPoint(). ◆ SetRow()
Defines a row of a matrix taking the values from a vector.
Definition at line 1000 of file basic_algebra.c. References RC2INDEX. Referenced by Newton2ManifoldPlane(). ◆ SetColumn()
Defines a column of a matrix taking the values from a vector.
Definition at line 1012 of file basic_algebra.c. References RC2INDEX. Referenced by EvaluateHessianVector(), EvaluateNHessianVector2(), HandC(), and LinearizeDynamics(). ◆ ScaleRow()
Multiples a row of a matrix by a given factor.
Definition at line 1025 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeRows(), and SumRowsScale(). ◆ ScaledAddRows()
Defines a vector as a scaled sum of rows of a matrix.
Definition at line 1037 of file basic_algebra.c. References RC2INDEX. Referenced by CRFxSAM(). ◆ ScaleColumn()
Multiples a column of a matrix by a given factor.
Definition at line 1071 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeColumns(), and SumColumnsScale(). ◆ RowsDotProduct()
Dot product between two rows of a matrix.
Definition at line 1083 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeHandC_FJH(), and OrthonormalizeRows(). ◆ ColumnsDotProduct()
Dot product between two columns of a matrix.
Definition at line 1108 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeColumns(). ◆ RowSquaredNorm()
Computes the squared norm of a row of a matrix.
Definition at line 1133 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeRows(). ◆ ColumnSquaredNorm()
Computes the squared norm of a column of a matrix.
Definition at line 1154 of file basic_algebra.c. References RC2INDEX. Referenced by FindRightNullVector(), and OrthonormalizeColumns(). ◆ SumRowsScale()
Accumulates in row 'i' the values in row 'j' scaled by factor 'sc'.
Definition at line 1175 of file basic_algebra.c. References RC2INDEX, and ScaleRow(). Referenced by OrthonormalizeRows(). ◆ SumColumnsScale()
Accumulates in column 'i' the values in column 'j' scaled by factor 'sc'.
Definition at line 1200 of file basic_algebra.c. References RC2INDEX, and ScaleColumn(). Referenced by OrthonormalizeColumns(). ◆ CopyRow()
Row copy.
Definition at line 1225 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeRows(). ◆ CopyColumn()
Column copy.
Definition at line 1237 of file basic_algebra.c. References RC2INDEX. Referenced by OrthonormalizeColumns(). ◆ IdentityMatrix()
Creates an identity matrix.
Definition at line 1249 of file basic_algebra.c. References RC2INDEX. Referenced by InitDynamicSpace(), MatrixExponential(), and NextDynamicState(). ◆ DiagonalMatrix()
Creates a diagonal matrix.
Definition at line 1258 of file basic_algebra.c. References RC2INDEX. ◆ SymmetrizeMatrix()
Enforces the symmetry of a squared matrix.
Definition at line 1267 of file basic_algebra.c. References RC2INDEX. Referenced by dGt(), and SetLinearizedDynamics(). ◆ MatrixVectorProduct()
Product of a matrix with r rows and c columns by a vector with c elements. The output is a vector of r entries. The input and output vectors must be allocated externally. Here we assume they have the correct size.
Definition at line 1287 of file basic_algebra.c. Referenced by BroydenUpdateJacobian(), ComputeAcceleration(), ComputeHandC_FJH(), ComputeInverseDynamics(), dr(), EvaluateHessianVector(), EvaluateHessianVector2(), EvaluateNHessianVector2(), GetJointBasicTransform(), HandC(), Local2Global(), LQRComputePolicy_t(), LQRPolicy(), MechEnergy(), RefineSingularPoint(), SAMxSAV(), and StepEffortGradient(). ◆ MatrixVectorProductAccum()
Accumulates in 'o' the product of a matrix with r rows and c columns by a vector with c elements. Note that 'o' must be different of A and 'b'. Otherwise the result would not be correct (and eventually an error is triggered).
Definition at line 1318 of file basic_algebra.c. References Error(), and RC2INDEX. Referenced by SAMxSAVAccum(). ◆ TMatrixVectorProduct()
Product of a transposed matrix with r rows and c columns by a vector with r elements. The output is a vector of c entries. The input and output vectors must be allocated externally. Here we assume they have the correct size.
Definition at line 1338 of file basic_algebra.c. Referenced by AtlasRRTValidateSample(), Chart2Manifold(), ComputeC(), CuikGradientInBox(), EvaluateSystemFromNJacobian(), LinearizeDynamics(), Manifold2Chart(), MinCosinusBetweenSubSpaces(), MinimizeOnAtlas(), NextDynamicState(), NextDynamicStateLocalEuler(), NextDynamicStateLocalRK4(), RefineSingularPoint(), StepDispersionGradient(), StepEffort(), StepEffortGradient(), StepLengthGradient(), Time2Go(), and TSAMxSAV(). ◆ TMatrixVectorProductAccum()
Accumulates the product of a transposed matrix with r rows and c columns by a vector with r elements. The output is a vector of c entries. Note that 'o' must be different of A and 'b'. Otherwise the result would not be correct (and eventually an error is triggered).
Definition at line 1369 of file basic_algebra.c. References Error(), and RC2INDEX. Referenced by TSAMxSAVAccum(). ◆ TMatrixVectorStrideProduct()
Product of a transposed matrix with r rows and c columns by a vector with r elements where the elements are separeted by stride positions. The output is a vector of c entries. The input and output vectors must be allocated externally. Here we assume they have the correct size.
Definition at line 1389 of file basic_algebra.c. Referenced by MinCosinusBetweenSubSpaces(). ◆ AccumulateMatrix()
Compute the sum of two matrices.
Definition at line 1420 of file basic_algebra.c. References AccumulateVector(). ◆ AccumulateTMatrix()
Compute the sum of a matrix and the transposed of another matrix. Both matrices are squared (otherwise the sizes would not match).
Definition at line 1425 of file basic_algebra.c. References RC2INDEX. Referenced by dG(). ◆ SubtractMatrix()
Compute the subtraction of two matrices.
Definition at line 1453 of file basic_algebra.c. References SubtractVector(). Referenced by rbi2mci(). ◆ MatrixMatrixProduct()
Computes the product of a matrix by another matrix.
Definition at line 1458 of file basic_algebra.c. Referenced by ComputeH(), ComputeHandC_FJH(), dG(), dGt(), HandC(), InitHandC(), MechEnergy(), ProjectToColumnSubSpace(), SAMxSAM(), SetLinearizedDynamics(), and TSAVxSAM(). ◆ MatrixMatrixProductAccum()
Accumulates the product of a matrix by another matrix. Note that C must be different of A and B. Otherwise the result would not be correct (and eventually an error is triggered).
Definition at line 1498 of file basic_algebra.c. References Error(), and RC2INDEX. Referenced by SAMxSAMAccum(). ◆ MatrixTMatrixProduct()
Computes the product of a matrix by another matrix transposed.
Definition at line 1527 of file basic_algebra.c. Referenced by dGt(), InitHandC(), rbi2mci(), and SetLinearizedDynamics(). ◆ TMatrixMatrixProduct()
Computes the product of a matrix transposed by another matrix.
Definition at line 1567 of file basic_algebra.c. Referenced by CompareTangentSpaces(), ComputeH(), FindRightNullVector(), ProjectToColumnSubSpace(), and TSAMxSAM(). ◆ MinCosinusBetweenSubSpaces()
We determine the cosinus of the maximum angle between tangent spaces. Note that we actually return the minimum of the absolute values of the cosinus. This is so since aligned tangent spaces form an angle of 0 or of pi (with cosinus 1 or -1 respectively). In other words, for subspaces to be equal this function should return 1. If the output is 0, the subspaces are orthogonal. In any case, we assume that the matrices defining the subspaces are orthonormal.
Definition at line 1607 of file basic_algebra.c. References NEW, Norm(), RC2INDEX, TMatrixVectorProduct(), and TMatrixVectorStrideProduct(). Referenced by MinCosinusBetweenCharts(). ◆ OrthonormalizeRows()
Applies the Gram-Schmidt process to the rows of a matrix. Note that the input matrix might not have independent rows. The output may have only few non-null rows (as many as those indicated by the return value of this function). The orthonormalized rows are returned in the first rows of the output matrix.
Definition at line 1651 of file basic_algebra.c. References CopyRow(), RowsDotProduct(), RowSquaredNorm(), ScaleRow(), and SumRowsScale(). ◆ OrthonormalizeColumns()
The same as OrthonormalizeRows but operating on columns.
Definition at line 1677 of file basic_algebra.c. References ColumnsDotProduct(), ColumnSquaredNorm(), CopyColumn(), ScaleColumn(), and SumColumnsScale(). ◆ ProjectToColumnSubSpace()
Projects a set of vectors into the sub-space spanned by the columns of a matrix. Note that despite projecting, the returnted vectors are in the original space (i.e., not given as components in the sub-space of the columns of me). We assume that the sub-space is given by a set of normalized vectors.
Definition at line 1710 of file basic_algebra.c. References MatrixMatrixProduct(), NEW, and TMatrixMatrixProduct(). ◆ RankOneUpdate()
Updates a matrix with a rank-one update.
Definition at line 1723 of file basic_algebra.c. References RC2INDEX. Referenced by BroydenUpdateJacobian(). ◆ SubMatrixFromMatrix()
Inserts a matrix as a submatrix of a larger matrix.
Definition at line 1740 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeAcceleration(), ComputeH(), ComputeInverseDynamics(), EvaluateJacobianInVector(), EvaluateJacobianSubSetInVector(), EvaluateTransposedJacobianInVector(), EvaluateTransposedJacobianSubSetInVector(), NextDynamicState(), and RefineSingularPoint(). ◆ AddSubMatrix()
Adds a submatrix into a particular position of a larger matrix.
Definition at line 1784 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeHandC_FJH(). ◆ SubMatrixFromSubMatrix()
Inserts a submatrix taken from a matrix as a submatrix of a second matrix.
Definition at line 1829 of file basic_algebra.c. References RC2INDEX. ◆ MatrixFromSubMatrix()
Copies a sub-matrix into a matrix. Note that rs+r_dst should be lower or equal than r_src and the same for the columns, but no error check is performed.
Definition at line 1926 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeHandC_FJH(), and rbi2mci(). ◆ SubMatrixFromTMatrix()
Inserts a transposed matrix as a submatrix of a larger matrix.
Definition at line 1970 of file basic_algebra.c. References RC2INDEX. Referenced by Chart2Manifold(), ComputeAcceleration(), ComputeH(), ComputeInverseDynamics(), GetChartDegree(), LQRComputePolicy(), LQRComputePolicy_t(), NextDynamicState(), and RefineSingularPoint(). ◆ SelectMatrixColumns()
Reduces the size of a matrix selecting some of their columns, for instance, the linearly independent ones.
Definition at line 2014 of file basic_algebra.c. References RC2INDEX. Referenced by GetPositionJacobian(). ◆ SelectMatrixRows()
Reduces the size of a matrix selecting some of their rows, for instance, the linearly independent ones.
Definition at line 2055 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeHandC_FJH(), and GetPositionJacobian(). ◆ PrintVector()
Prints a vector into a file.
Definition at line 2096 of file basic_algebra.c. Referenced by AddBranchToAtlasDynamicRRT(), AddBranchToAtlasRRT(), AddChart2AtlasRRT(), ApplyExternalForces(), AtlasRRT(), AtlasRRTValidateSample(), BroydenStep(), ComputeAcceleration(), ComputeC(), ComputeH(), ComputeJacobianKernelBasis(), DynamicStepResidue(), GetChartDegree(), GetRRTNNInChart(), HandC(), InitChartInt(), LinearizeDynamics(), LQRComputePolicy(), LQRComputePolicy_t(), main(), MechEnergy(), NewTemptativeSample(), NextDynamicState(), PointTowardRandSample(), and UpdateLQRPolicy(). ◆ SaveVector()
Saves a vector into a file.
Definition at line 2108 of file basic_algebra.c. Referenced by main(). ◆ PrintMatrix()
Prints a matrix into a file.
Definition at line 2117 of file basic_algebra.c. References RC2INDEX. Referenced by ApplyExternalForces(), BroydenStep(), ComputeAcceleration(), ComputeC(), ComputeH(), FindRightNullVector(), GetChartDegree(), HandC(), InitHandC(), LinearizeDynamics(), LQRComputePolicy(), LQRComputePolicy_t(), MechEnergy(), NextDynamicState(), PointTowardRandSample(), and UpdateLQRPolicy(). ◆ PrintTMatrix()
Prints a transposed matrix into a file.
Definition at line 2140 of file basic_algebra.c. References RC2INDEX. Referenced by ComputeAcceleration(), ComputeJacobianKernelBasis(), FindRightNullVector(), GetPositionJacobian(), and NextDynamicState(). |
Follow us!