Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vector ¶
type Vector interface { // Returns the index of vect. If vect is not in gcv it returns -1. IndexOf(val gcv.Value) int // Returns the Value at index Get(index int) gcv.Value // Set the Value val at index Set(index int, val gcv.Value) // Return norm of vector Norm() gcv.Value // return the normalized unit vector of Vector. will return error if norm is equal to 0. Unit() (Vector, error) // Returns a new Copy of vector Copy() Vector // Returns Space of vector. Either Column or Row vector Space() Space // Returns the core value type of the vector Type() gcv.Type // Returns the len of the gcv Len() int // Transpose of vector. i.e changes a row into a column vector and vice versa Trans() // Conjugate of a vector Conj() // Conjugate Transpose of vector. i.e changes a row into a column vector and vice versa ConjTrans() // Append a value to vector Append(val gcv.Value) // Returns the elements in the vector Elements() gcv.Values }
Vector is the main vector interface for real vectors
func MakeConjTransVector ¶
MakeConjTransVector returns a new conjugate transpose vector of vector
func MakeConjVector ¶
MakeConjVector returns a new conjugate vector of vector
func MakeTransVector ¶
MakeTransVector returns a new transpose vector of vector
func MakeVector ¶
MakeVector returns Vector, takes in a slice of interfaces. in an interface is not a supported type, that interface will be forced to the zero Value
func MakeVectorAlt ¶
MakeVectorAlt returns Vector, requires a framework gcv type
type Vectors ¶
type Vectors interface { // Returns the index of vect. If vect is not in Values it returns -1. IndexOf(vect Vector) int // Set the Vector vect at index. If vect is not in the space of other vectors // Trans() method will be called on it. Set(index int, vect Vector) // Set value j of vector i in vectors to val SetValue(i int, j int, val gcv.Value) // Append Vector vect to Vectors Append(vect Vector) // Returns the Vector at index Get(index int) Vector // Returns the Raw Vector slice. Used mainly for use with range Vectors() []Vector // Returns a subset of Vectors from start to finish Subset(start, finish int) Vectors // Returns a copy of Vectors. Copy() Vectors // Returns the length of Vectors slice. this is the same as the number of vectors in Vectors Len() int // Returns the length of the individual vectors in Vectors InnerLen() int // Returns the space that Vectors is in Space() Space // Returns the highest ranking vector type Type() gcv.Type }
Vectors returns the set of vectors in a particular vector space
func MakeVectors ¶
MakeVectors will return a Vectors type. All vectors will be in vector space, space. If inputed vector is not in that vector space, Trans() will be called on it
func MakeVectorsAlt ¶
MakeVectorsAlt returns a Vectors type, but requires a framework []Vector slice
func NewVectors ¶
NewVectors will return the Zero Vectors. or numVectors of zero vectors of length lenVectors