AbstractVector:
Filter:
VectorSpace/Classes (extension) | Math

AbstractVector
ExtensionExtension

an element of F^N

Description

Represents an element of F^N, where F is either the real numbers R or the complex numbers C. Usual operations are implemented. Examples are given with RealVector.

Class Methods

.new

Create new vector from a n-tuple of real numbers. Dimension of the vector is determined by the amount of numbers.

.gramSchmidt

Applies the gramSchmidt process to the vectors and returns an array of orthogonal vectors that span the same subspace as the original vectors.

NOTE: rounding errors will usually not give you completely orthogonal vectors.

Instance Methods

.x

.y

.z

components for vectors up to 3 dimensions.

<|>

inner product.

.dist

distance.

.norm

euclidian norm - sqrt( vector <|> vector ).

.normalize

.isOrthogonal

.transpose

returns the transposed vector as a one row matrix.

.proj

projects vector into the current vector.

.clip

Clips a vector in all dimensions.

Arguments:

min

The minimum.

ARGUMENT: max The maximum.

Examples

usual vector space operations