jonathanfishbein1/linear-algebra/28.2.0

NOTE: the latest version is 30.0.0

ColumnVector

A module for Column Vectors

Types

= ColumnVector (Vector a)

Column Vector

Unitary Operations

sum : Monoid a -> ColumnVector a -> a

Calculate the sum of a Vector

Scalar multiplication over a ColumnVector

ColumnVector (ComplexNumber number)
-> ColumnVector (ComplexNumber number)

Take the complex conjugate of a Complex Numbered ColumnVector

lengthReal : ColumnVector (Real Float) -> Real Float

Calculate the length of a Real valued Vector

lengthComplex : ColumnVector (ComplexNumber Float) -> Real Float

Calculate the length of a Complex valued Vector

Binary Operations

add : Field a -> ColumnVector a -> ColumnVector a -> ColumnVector a

Add two ColumnVectors

dotProduct : Field a -> ColumnVector a -> ColumnVector a -> a

Calculate the dot product of two Vectors

ColumnVector (Real Float)
-> ColumnVector (Real Float)
-> Real Float

Calculate distance between two vectors

ColumnVector (ComplexNumber Float)
-> ColumnVector (ComplexNumber Float)
-> Real Float

Calculate distance between two vectors

ColumnVector Properties

Count of number of elements in a Ket

Semigroup, Functor, Applicative, Monad, Foldable

Monoid empty for Vector

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

map over a RowVector

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

Left fold over a RowVector

Equality

equal : (a -> a -> Bool) -> Equality (ColumnVector a)

Equal type for Vector.

Manipulation

getAt : Int -> ColumnVector a -> Maybe a

Get the value in a Column Vector at the specified index

setAt : Int -> a -> ColumnVector a -> ColumnVector a

Set the value in a Column Vector at the specified index