Generic Module

Functions and values

Function or value Description

add vector1 vector2

Full Usage: add vector1 vector2

Parameters:
Returns: Vector<'a>
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

compare comparer vector

Full Usage: compare comparer vector

Parameters:
Returns: Vector<'a> -> int
comparer : IComparer
vector : Vector<'a>
Returns: Vector<'a> -> int

copy vector

Full Usage: copy vector

Parameters:
Returns: Vector<'a>
vector : Vector<'a>
Returns: Vector<'a>

cptMax vector1 vector2

Full Usage: cptMax vector1 vector2

Parameters:
Returns: Vector<'a>
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

cptMin vector1 vector2

Full Usage: cptMin vector1 vector2

Parameters:
Returns: Vector<'a>
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

cptMul vector1 vector2

Full Usage: cptMul vector1 vector2

Parameters:
Returns: Vector<'a>
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

create count value

Full Usage: create count value

Parameters:
    count : int -
    value : 'a -

Returns: Vector<'a>

Creates vector of length count and fills it with value

count : int

value : 'a

Returns: Vector<'a>

Example

dot vector1 vector2

Full Usage: dot vector1 vector2

Parameters:
Returns: 'a

Dot product of the two vectors

vector1 : Vector<'a>

vector2 : Vector<'a>

Returns: 'a

Example

exists predicate vector

Full Usage: exists predicate vector

Parameters:
    predicate : 'T -> bool
    vector : Vector<'T>

Returns: bool
predicate : 'T -> bool
vector : Vector<'T>
Returns: bool

existsi predicate vector

Full Usage: existsi predicate vector

Parameters:
    predicate : int -> 'T -> bool
    vector : Vector<'T>

Returns: bool
predicate : int -> 'T -> bool
vector : Vector<'T>
Returns: bool

fold folder state vector

Full Usage: fold folder state vector

Parameters:
    folder : 'State -> 'T -> 'State
    state : 'State
    vector : Vector<'T>

Returns: 'State
folder : 'State -> 'T -> 'State
state : 'State
vector : Vector<'T>
Returns: 'State

foldi folder state vector

Full Usage: foldi folder state vector

Parameters:
    folder : int -> 'State -> 'T -> 'State
    state : 'State
    vector : Vector<'T>

Returns: 'State
folder : int -> 'State -> 'T -> 'State
state : 'State
vector : Vector<'T>
Returns: 'State

forall predicate vector

Full Usage: forall predicate vector

Parameters:
    predicate : 'T -> bool
    vector : Vector<'T>

Returns: bool
predicate : 'T -> bool
vector : Vector<'T>
Returns: bool

foralli predicate vector

Full Usage: foralli predicate vector

Parameters:
    predicate : int -> 'T -> bool
    vector : Vector<'T>

Returns: bool
predicate : int -> 'T -> bool
vector : Vector<'T>
Returns: bool

get vector index

Full Usage: get vector index

Parameters:
    vector : Vector<'T> -
    index : int

Returns: 'T

Returns the value of the vector a at the given index i

vector : Vector<'T>

index : int
Returns: 'T

Example

hash a

Full Usage: hash a

Parameters:
Returns: Vector<'a> -> int
a : IEqualityComparer
Returns: Vector<'a> -> int

init count initializer

Full Usage: init count initializer

Parameters:
    count : int -
    initializer : int -> 'c -

Returns: Vector<'c>

Initializes vector with count members, based on function f

count : int

initializer : int -> 'c

Returns: Vector<'c>

Example

initNumeric count f

Full Usage: initNumeric count f

Parameters:
    count : int
    f : INumeric<'a> -> int -> 'a

Returns: Vector<'a>
count : int
f : INumeric<'a> -> int -> 'a
Returns: Vector<'a>

inplaceAdd vector1 vector2

Full Usage: inplaceAdd vector1 vector2

Parameters:
vector1 : Vector<'a>
vector2 : Vector<'a>

inplaceAssign f vector

Full Usage: inplaceAssign f vector

Parameters:
    f : int -> 'a
    vector : Vector<'a>

f : int -> 'a
vector : Vector<'a>

inplaceCptMul vector1 vector2

Full Usage: inplaceCptMul vector1 vector2

Parameters:
vector1 : Vector<'a>
vector2 : Vector<'a>

inplaceMap f v

Full Usage: inplaceMap f v

Parameters:
f : 'a -> 'a
v : Vector<'a>

inplaceMapi f v

Full Usage: inplaceMapi f v

Parameters:
    f : int -> 'a -> 'a
    v : Vector<'a>

f : int -> 'a -> 'a
v : Vector<'a>

inplaceScale vector1 vector2

Full Usage: inplaceScale vector1 vector2

Parameters:
    vector1 : 'a
    vector2 : Vector<'a>

vector1 : 'a
vector2 : Vector<'a>

inplaceSub vector1 vector2

Full Usage: inplaceSub vector1 vector2

Parameters:
vector1 : Vector<'a>
vector2 : Vector<'a>

length vector

Full Usage: length vector

Parameters:
Returns: int

Returns length of vector v

vector : Vector<'T>

Returns: int

Example

map mapping vector

Full Usage: map mapping vector

Parameters:
    mapping : 'a -> 'a
    vector : Vector<'a>

Returns: Vector<'a>
mapping : 'a -> 'a
vector : Vector<'a>
Returns: Vector<'a>

map2 mapping vector1 vector2

Full Usage: map2 mapping vector1 vector2

Parameters:
    mapping : 'a -> 'a -> 'a
    vector1 : Vector<'a>
    vector2 : Vector<'a>

Returns: Vector<'a>
mapping : 'a -> 'a -> 'a
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

map3 mapping vector1 vector2 vector3

Full Usage: map3 mapping vector1 vector2 vector3

Parameters:
    mapping : 'a -> 'a -> 'a -> 'a
    vector1 : Vector<'a>
    vector2 : Vector<'a>
    vector3 : Vector<'a>

Returns: Vector<'a>
mapping : 'a -> 'a -> 'a -> 'a
vector1 : Vector<'a>
vector2 : Vector<'a>
vector3 : Vector<'a>
Returns: Vector<'a>

mapi mapping vector

Full Usage: mapi mapping vector

Parameters:
    mapping : int -> 'a -> 'a
    vector : Vector<'a>

Returns: Vector<'a>
mapping : int -> 'a -> 'a
vector : Vector<'a>
Returns: Vector<'a>

mulRVV vector1 vector2

Full Usage: mulRVV vector1 vector2

Parameters:
Returns: 'a
vector1 : RowVector<'a>
vector2 : Vector<'a>
Returns: 'a

mulVRV vector1 vector2

Full Usage: mulVRV vector1 vector2

Parameters:
Returns: Matrix<'a>
vector1 : Vector<'a>
vector2 : RowVector<'a>
Returns: Matrix<'a>

neg vector

Full Usage: neg vector

Parameters:
Returns: Vector<'a>
vector : Vector<'a>
Returns: Vector<'a>

norm a

Full Usage: norm a

Parameters:
Returns: float
a : Vector<'a>
Returns: float

ofArray array

Full Usage: ofArray array

Parameters:
    array : 'a[]

Returns: Vector<'a>
array : 'a[]
Returns: Vector<'a>

ofList list

Full Usage: ofList list

Parameters:
    list : 'a list -

Returns: Vector<'a>

Creates vector from list xss

list : 'a list

Returns: Vector<'a>

Example

ofScalar x

Full Usage: ofScalar x

Parameters:
    x : 'a

Returns: Vector<'a>
x : 'a
Returns: Vector<'a>

ofSeq source

Full Usage: ofSeq source

Parameters:
    source : seq<'a> -

Returns: Vector<'a>

Creates vector from seq xss

source : seq<'a>

Returns: Vector<'a>

Example

oneCreate count

Full Usage: oneCreate count

Parameters:
    count : int -

Returns: Vector<'a>

Creates a vector of length count and fills it with ones

count : int

Returns: Vector<'a>

Example

prod a

Full Usage: prod a

Parameters:
Returns: 'a
a : Vector<'a>
Returns: 'a

scale a b

Full Usage: scale a b

Parameters:
Returns: Vector<'a>
a : 'a
b : Vector<'a>
Returns: Vector<'a>

set vector index value

Full Usage: set vector index value

Parameters:
    vector : Vector<'T> -
    index : int
    value : 'T

Sets the value x to the vector a at the given index i

vector : Vector<'T>

index : int
value : 'T
Example

sub vector1 vector2

Full Usage: sub vector1 vector2

Parameters:
Returns: Vector<'a>
vector1 : Vector<'a>
vector2 : Vector<'a>
Returns: Vector<'a>

sum a

Full Usage: sum a

Parameters:
Returns: 'a

Sum of all elements of the vector a

a : Vector<'a>

Returns: 'a

Example

toArray vector

Full Usage: toArray vector

Parameters:
Returns: 'T[]
vector : Vector<'T>
Returns: 'T[]

transpose vector

Full Usage: transpose vector

Parameters:
Returns: RowVector<'a>
vector : Vector<'a>
Returns: RowVector<'a>

unzip vector

Full Usage: unzip vector

Parameters:
Returns: Vector<'a> * Vector<'b>
vector : Vector<'a * 'b>
Returns: Vector<'a> * Vector<'b>

zeroCreate count

Full Usage: zeroCreate count

Parameters:
    count : int -

Returns: Vector<'b>

Creates a vector of length count and fills it with zeros

count : int

Returns: Vector<'b>

Example

zip vector1 vector2

Full Usage: zip vector1 vector2

Parameters:
Returns: Vector<'a * 'b>
vector1 : Vector<'a>
vector2 : Vector<'b>
Returns: Vector<'a * 'b>