Uses of Class
toxi.geom.GVector
Packages that use GVector
-
Uses of GVector in toxi.geom
Modifier and TypeMethodDescriptionfinal GVectorCreates the vector sum of this vector and the given one (must be equal sized).final GVectorSets the value of this vector to sum of itself and the specified vectorfinal GVectorGVector.interpolateTo(GVector v, double alpha) Linearly interpolates this vector to the target vector and places the result into a new instance: result = this + (target-this)*alpha.final GVectorGVector.interpolateTo(GVector v, double alpha, InterpolateStrategy strategy) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy.final GVectorGVector.interpolateToSelf(GVector v, double alpha) Linearly interpolates this vector to the target vector and places result in this vector.final GVectorGVector.interpolateToSelf(GVector v, double alpha, InterpolateStrategy strategy) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy.final GVectorGVector.scale(double s) Scales this vector by the scale factor s and returns result as new vector.final GVectorScales the values of this vector with the values of the given vector vector (this = this * vector).final GVectorGVector.scaleSelf(double s) Scales this vector by the scale factor s.final GVectorScales the values of this vector with the values of the given vector vector (this = this * vector).final GVectorGVector.set(double[] vector) Sets the values of this vector to the values found in the array parameter.final GVectorSets the value of this vector to the values found in vector vector.final GVectorGVector.set(ReadonlyVec2D tuple) Sets the value of this vector to the values in tuplefinal GVectorGVector.set(ReadonlyVec3D tuple) Sets the value of this vector to the values in tuplefinal GVectorGVector.set(ReadonlyVec4D tuple) Sets the value of this vector to the values in tuplefinal GVectorGVector.setElement(int index, double value) Modifies the value at the specified index of this vector.final GVectorGVector.setSize(int length) Changes the size of this vector dynamically.final GVectorCreates the vector difference of this vector and the given one (must be equal sized).final GVectorSets the value of this vector to the vector difference of itself and vector (this = this - vector).final GVectorGVector.zero()Sets all the values in this vector to zero.Modifier and TypeMethodDescriptionfinal GVectorCreates the vector sum of this vector and the given one (must be equal sized).final GVectorSets the value of this vector to sum of itself and the specified vectorfinal doubleGVector.angleBetween(GVector v) Returns the (n-space) angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].final voidGVector.backSolveLUD(GMatrix LU, GVector b, GVector permutation) LU Decomposition Back Solve; this method takes the LU matrix and the permutation vector produced by the GMatrix method LUD and solves the equation (LU)*x = b by placing the solution vector x into this vector.final voidGVector.backSolveSVD(GMatrix U, GMatrix W, GMatrix V, GVector b) Solves for x in Ax = b, where x is this vector (nx1), A is mxn, b is mx1, and A = U*W*transpose(V); U,W,V must be precomputed and can be found by taking the singular value decomposition (SVD) of A using the method SVD found in the GMatrix class.final intGMatrix.computeLUD(GMatrix LU, GVector permutation) LU Decomposition: this matrix must be a square matrix and the LU GMatrix parameter must be the same size as this matrix.final doubleReturns the dot product of this vector and vector v.booleanReturns true if all of the data members of GVector vector1 are equal to the corresponding data members in this GVector.booleanGVector.equalsWithTolerance(GVector v, double tolerance) Returns true if the L-infinite distance between this vector and vector v is less than or equal to the tolerance parameter, otherwise returns false.final voidPlaces the values of the specified column into the vector parameter.final voidPlaces the values of the specified row into the vector parameter.final GVectorGVector.interpolateTo(GVector v, double alpha) Linearly interpolates this vector to the target vector and places the result into a new instance: result = this + (target-this)*alpha.final GVectorGVector.interpolateTo(GVector v, double alpha, InterpolateStrategy strategy) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy.final GVectorGVector.interpolateToSelf(GVector v, double alpha) Linearly interpolates this vector to the target vector and places result in this vector.final GVectorGVector.interpolateToSelf(GVector v, double alpha, InterpolateStrategy strategy) Interpolates the vector towards the given target vector, using the givenInterpolateStrategy.final voidComputes the outer product of the two vectors; multiplies the the first vector by the transpose of the second vector and places the matrix result into this matrix.final voidMultiplies matrix m1 times Vector v1 and places the result into this vector (this = m1*v1).final voidMultiplies the transpose of vector v1 (ie, v1 becomes a row vector with respect to the multiplication) times matrix m1 and places the result into this vector (this = transpose(v1)*m1).final GVectorScales the values of this vector with the values of the given vector vector (this = this * vector).final GVectorScales the values of this vector with the values of the given vector vector (this = this * vector).final GVectorSets the value of this vector to the values found in vector vector.final voidCopy the values from the vector into the specified column of this matrix.final voidCopy the values from the vector into the specified row of this matrix.final GVectorCreates the vector difference of this vector and the given one (must be equal sized).final GVectorSets the value of this vector to the vector difference of itself and vector (this = this - vector).