jonathanfishbein1/linear-algebra/5.0.0

NOTE: the latest version is 30.0.0

Vector

A module for Vectors

Types

type Vector a
= Vector (List a)

Vector type

type Vector3 a
= Vector3 a a a

3 Dimensional Vector type

type Scalar a
= Scalar a

Type to represent a scalar value

Vector (ComplexNumberCartesian number)
-> Vector (ComplexNumberCartesian number)
-> Vector (ComplexNumberCartesian number)

Add Complex Vectors together

addRealVectors : Vector number -> Vector number -> Vector number

Add Real Vectors together

map : (a -> b) -> Vector a -> Vector b

Map over a vector

multiplyRealVectors : Vector number -> Vector number -> Vector number

Multiply two Real Vectors together

Vector (ComplexNumberCartesian number)
-> Vector (ComplexNumberCartesian number)
-> Vector (ComplexNumberCartesian number)

Multiply two Complex Vectors together

equal : (a -> a -> Bool) -> Vector a -> Vector a -> Bool

Compare two Vectors for equality

apply : Vector (a -> b) -> Vector a -> Vector b

Apply for Vector

liftA2 : (a -> b -> c) -> Vector a -> Vector b -> Vector c

Lift a binary function to work with Vectors

foldl : (a -> b -> b) -> b -> Vector a -> b

Left fold over a Vector

realVectorDotProduct : Vector number -> Vector number -> number

Dot product on two Real Numbered Vectors

Vector (ComplexNumberCartesian number)
-> Vector (ComplexNumberCartesian number)
-> ComplexNumberCartesian number

Dot product on two Complex Numbered Vectors

concat : Monoid (Vector a)

Monoidally append Vectors together

Vector (ComplexNumberCartesian Float)
-> ComplexNumberCartesian Float

Calculate length of a complex vector

cross : Vector3 number -> Vector3 number -> Vector3 number

Take the cross product of two 3D vectors

distance : Vector Float -> Vector Float -> Float

Calculate distance between two vectors

normalise : Vector Float -> Vector Float

Adjust a vector so that its length is exactly one

realVectorLength : Vector Float -> Float

Calculate length of a real vector

subtractRealVectors : Vector number -> Vector number -> Vector number

Subtract Real Vectors together

vector3ToVector : Vector3 number -> Vector number

Convert a Vector3 type to a Vector typeZ

dimension : Vector a -> Int

Count of number of elements in a vector

realVectorSubspace : Scalar number -> List (Vector number) -> List (number -> Bool) -> Bool

Function to determine if a set of real valued vectors is a valid subspace

Scalar (ComplexNumberCartesian number)
-> List (Vector (ComplexNumberCartesian number))
-> List (ComplexNumberCartesian number -> Bool)
-> Bool

Function to determine if a set of complex valued vectors is a valid subspace

append : Vector a -> Vector a -> Vector a

Append Vectors together

Monoid empty for Vector

pure : a -> Vector a

Place a value in minimal Vector context