| Value | Description |
val add : vector -> vector -> vector |
Add two vectors (operator +)
|
val cptMul : vector -> vector -> vector |
Point-wise multiplication of two vectors (operator .*)
|
val cptPow : vector -> float -> vector |
Pointwise exponential of a vector.
|
val create : int -> float -> vector |
Generate a vector of the given length where each entry contains the given value
|
val dot : vector -> vector -> float |
Dot product
|
val exists : (float -> bool) -> vector -> bool | |
val existsi : (int -> float -> bool) -> vector -> bool | |
val fold : ('a -> float -> 'a) -> 'a -> vector -> 'a | |
val foldi : (int -> 'a -> float -> 'a) -> 'a -> vector -> 'a | |
val forall : (float -> bool) -> vector -> bool | |
val foralli : (int -> float -> bool) -> vector -> bool | |
val get : vector -> int -> float |
Get an element of a column vector
|
val init : int -> (int -> float) -> vector | |
val inplace_add : vector -> vector -> unit | |
val inplace_assign : (int -> float) -> vector -> unit | |
val inplace_cptMul : vector -> vector -> unit | |
val inplace_mapi : (int -> float -> float) -> vector -> unit | |
val inplace_scale : float -> vector -> unit | |
val inplace_sub : vector -> vector -> unit | |
val length : vector -> int |
Get the dimensions (number of rows) of a column vector. Identical to [[nrows]]
|
val map : (float -> float) -> vector -> vector | |
val mapi : (int -> float -> float) -> vector -> vector | |
val neg : vector -> vector |
Negation of the vector (each element is negated) (unary operator -)
|
val norm : vector -> float |
sum(x*x) of all or some of the matrix
|
val nrows : vector -> int |
Get the number of rows of a column vector.
|
val of_list : float list -> vector |
Create a vector from a list of numbers
|
val of_scalar : float -> vector |
Create a 1-element vector
|
val prod : vector -> float |
Multiply all the elements of the matrix
|
val range : int -> int -> vector |
Create a vector that represents a integral mesh over the given range
e.g. range 1 5 = vector [ 1.;2.;3.;4.;5. ]
|
val rangef : float -> float -> float -> vector |
Create a vector that represents a mesh over the given range
e.g. rangef (-1.0) 0.5 1.0 = vector [ -1.0; -0.5; 0.0; 0.5; 1.0]
|
val scale : float -> vector -> vector |
Pointwise multiplication of a matrix by a scalar
|
val set : vector -> int -> float -> unit |
Set an element of a column vector
|
val sub : vector -> vector -> vector |
Subtract one vector from another (operator -)
|
val sum : vector -> float |
Sum all the elements of a vector
|
val transpose : vector -> rowvec |
Transpose of a matrix. Use also m.Transpose
|
val zero : int -> vector |
Return a vector of the given length where every entry is zero.
|