[Home] Module Microsoft.FSharp.Math.Vector


Operations to manipulate floating point column vectors. The submodule VectorOps.Generic contains a matching set of operations to manipulate column vectors carrying arbitrary element types.

Modules (as contributed by assembly 'FSharp.Core')

ModuleDescription
Microsoft.FSharp.Math.Vector.Generic Operations to manipulate column vectors carrying arbitrary element types.

Values

ValueDescription
val add : vector -> vector -> vector
Add two vectors (operator +)
val copy : vector -> vector
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
Computes the 2-norm of a vector: sqrt(x.Transpose*x).
val nrows : vector -> int
Get the number of rows of a column vector.
val of_array : float array -> vector
Create a vector from an array of double precision floats
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 of_seq : #seq<float> -> 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 to_array : vector -> float array
Return a new array containing a copy of the elements of the given 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.

See Also

Microsoft.FSharp.Math


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19