FSharpPlus


Matrix Module

Namespace: FSharpPlus.Data

Assembly: FSharpPlus.dll

Functions and values

Function or value Description

col j mtx

Full Usage: col j mtx

Parameters:
    j : ^jwhen^j<^n
    mtx : Matrix<'a, ^m, ^n>

Returns: Matrix<'a, ^m, S<Z>>

You can also use `Matrix.Col.AsMatrix mtx`.

j : ^jwhen^j<^n
mtx : Matrix<'a, ^m, ^n>
Returns: Matrix<'a, ^m, S<Z>>

colLength arg1

Full Usage: colLength arg1

Parameters:
Returns: ^n

arg0 : Matrix<'a, 'm, ^n>
Returns: ^n

colLength' arg1

Full Usage: colLength' arg1

Parameters:
Returns: int

arg0 : Matrix<'a, 'm, ^n>
Returns: int

colVec j mtx

Full Usage: colVec j mtx

Parameters:
    j : ^jwhen^j<^n
    mtx : Matrix<'a, ^m, ^n>

Returns: Vector<'a, ^m>

You can also use `Matrix.Col.AsVector mtx`.

j : ^jwhen^j<^n
mtx : Matrix<'a, ^m, ^n>
Returns: Vector<'a, ^m>

create definition

Full Usage: create definition

Parameters:
    definition : ^('a*..*'a)*..*('a*..*'a)

Returns: Matrix<'a, ^m, ^n>

definition : ^('a*..*'a)*..*('a*..*'a)
Returns: Matrix<'a, ^m, ^n>

diagonal mtx

Full Usage: diagonal mtx

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

mtx : Matrix<'a, 'n, 'n>
Returns: Vector<'a, 'n>

directSum mtx1 mtx2

Full Usage: directSum mtx1 mtx2

Parameters:
Returns: Matrix<'t, ^m1+^m2, ^n1+^n2>

mtx1 : Matrix<'t, ^m1, ^n1>
mtx2 : Matrix<'t, ^m2, ^n2>
Returns: Matrix<'t, ^m1+^m2, ^n1+^n2>

get row column mat

Full Usage: get row column mat

Parameters:
    row : ^iwhen^i<^m
    column : ^jwhen^j<^n
    mat : Matrix<'a, ^m, ^n>

Returns: 'a

You can also use `Matrix.Get.Invoke mat`.

row : ^iwhen^i<^m
column : ^jwhen^j<^n
mat : Matrix<'a, ^m, ^n>
Returns: 'a

hadamardProduct m1 m2

Full Usage: hadamardProduct m1 m2

Parameters:
Returns: Matrix<^t, 'm, 'n>

m1 : Matrix<^t, 'm, 'n>
m2 : Matrix<^t, 'm, 'n>
Returns: Matrix<^t, 'm, 'n>

horizontalSum m1 m2

Full Usage: horizontalSum m1 m2

Parameters:
Returns: Matrix<'t, ^m, ^n1+^n2>

m1 : Matrix<'t, ^m, ^n1>
m2 : Matrix<'t, ^m, ^n2>
Returns: Matrix<'t, ^m, ^n1+^n2>

identity

Full Usage: identity

Returns: Matrix<^a, ^m, ^m>

Returns: Matrix<^a, ^m, ^m>

indexed m

Full Usage: indexed m

Parameters:
Returns: Matrix<(int * int * 'a), 'm, 'n>

m : Matrix<'a, 'm, 'n>
Returns: Matrix<(int * int * 'a), 'm, 'n>

init m n f

Full Usage: init m n f

Parameters:
    m : ^m
    n : ^n
    f : int -> int -> 'a

Returns: Matrix<'a, ^m, ^n>

You can also use `Matrix.Init.Invoke f`.

m : ^m
n : ^n
f : int -> int -> 'a
Returns: Matrix<'a, ^m, ^n>

iter f m

Full Usage: iter f m

Parameters:
    f : 'a -> unit
    m : Matrix<'a, 'm, 'n>

f : 'a -> unit
m : Matrix<'a, 'm, 'n>

iter2 f m1 m2

Full Usage: iter2 f m1 m2

Parameters:
    f : 'a -> 'b -> unit
    m1 : Matrix<'a, 'm, 'n>
    m2 : Matrix<'b, 'm, 'n>

f : 'a -> 'b -> unit
m1 : Matrix<'a, 'm, 'n>
m2 : Matrix<'b, 'm, 'n>

iteri f m

Full Usage: iteri f m

Parameters:
    f : int -> int -> 'a -> unit
    m : Matrix<'a, 'm, 'n>

f : int -> int -> 'a -> unit
m : Matrix<'a, 'm, 'n>

iteri2 f m1 m2

Full Usage: iteri2 f m1 m2

Parameters:
    f : int -> int -> 'a -> 'b -> unit
    m1 : Matrix<'a, 'm, 'n>
    m2 : Matrix<'b, 'm, 'n>

f : int -> int -> 'a -> 'b -> unit
m1 : Matrix<'a, 'm, 'n>
m2 : Matrix<'b, 'm, 'n>

kroneckerProduct mtx1 mtx2

Full Usage: kroneckerProduct mtx1 mtx2

Parameters:
Returns: Matrix<^t, ^m1*^m2, ^n1*^n2>

mtx1 : Matrix<^t, ^m1, ^n1>
mtx2 : Matrix<^t, ^m2, ^n2>
Returns: Matrix<^t, ^m1*^m2, ^n1*^n2>

kroneckerSum mtx1 mtx2

Full Usage: kroneckerSum mtx1 mtx2

Parameters:
Returns: Matrix<^t, ^m*^n, ^m*^n>

mtx1 : Matrix<^t, ^m, ^m>
mtx2 : Matrix<^t, ^n, ^n>
Returns: Matrix<^t, ^m*^n, ^m*^n>

map f m

Full Usage: map f m

Parameters:
    f : 'a -> 'b
    m : Matrix<'a, 'm, 'n>

Returns: Matrix<'b, 'm, 'n>

f : 'a -> 'b
m : Matrix<'a, 'm, 'n>
Returns: Matrix<'b, 'm, 'n>

map2 f m1 m2

Full Usage: map2 f m1 m2

Parameters:
    f : 'a -> 'b -> 'c
    m1 : Matrix<'a, 'm, 'n>
    m2 : Matrix<'b, 'm, 'n>

Returns: Matrix<'c, 'm, 'n>

f : 'a -> 'b -> 'c
m1 : Matrix<'a, 'm, 'n>
m2 : Matrix<'b, 'm, 'n>
Returns: Matrix<'c, 'm, 'n>

mapi f m

Full Usage: mapi f m

Parameters:
    f : int -> int -> 'a -> 'b
    m : Matrix<'a, 'm, 'n>

Returns: Matrix<'b, 'm, 'n>

f : int -> int -> 'a -> 'b
m : Matrix<'a, 'm, 'n>
Returns: Matrix<'b, 'm, 'n>

mapi2 f m1 m2

Full Usage: mapi2 f m1 m2

Parameters:
    f : int -> int -> 'a -> 'b -> 'c
    m1 : Matrix<'a, 'm, 'n>
    m2 : Matrix<'b, 'm, 'n>

Returns: Matrix<'c, 'm, 'n>

f : int -> int -> 'a -> 'b -> 'c
m1 : Matrix<'a, 'm, 'n>
m2 : Matrix<'b, 'm, 'n>
Returns: Matrix<'c, 'm, 'n>

matrixProduct m1 m2

Full Usage: matrixProduct m1 m2

Parameters:
Returns: Matrix<^t, ^m, ^p>

m1 : Matrix<^t, ^m, ^n>
m2 : Matrix<^t, ^n, ^p>
Returns: Matrix<^t, ^m, ^p>

ofCols xs

Full Usage: ofCols xs

Parameters:
Returns: Matrix<'a, ^m, ^n>

xs : Vector<Vector<'a, ^m>, ^n>
Returns: Matrix<'a, ^m, ^n>

ofRows xs

Full Usage: ofRows xs

Parameters:
Returns: Matrix<'a, ^m, ^n>

xs : Vector<Vector<'a, ^n>, ^m>
Returns: Matrix<'a, ^m, ^n>

replicate m n value

Full Usage: replicate m n value

Parameters:
    m : ^m
    n : ^n
    value : 'a

Returns: Matrix<'a, ^m, ^n>

You can also use `Matrix.Replicate.Invoke value`.

m : ^m
n : ^n
value : 'a
Returns: Matrix<'a, ^m, ^n>

row i mtx

Full Usage: row i mtx

Parameters:
    i : ^iwhen^i<^m
    mtx : Matrix<'a, ^m, ^n>

Returns: Matrix<'a, S<Z>, ^n>

You can also use `Matrix.Row.AsMatrix mtx`.

i : ^iwhen^i<^m
mtx : Matrix<'a, ^m, ^n>
Returns: Matrix<'a, S<Z>, ^n>

rowLength arg1

Full Usage: rowLength arg1

Parameters:
Returns: ^m

arg0 : Matrix<'a, ^m, 'n>
Returns: ^m

rowLength' arg1

Full Usage: rowLength' arg1

Parameters:
Returns: int

arg0 : Matrix<'a, ^m, 'n>
Returns: int

rowVec i mtx

Full Usage: rowVec i mtx

Parameters:
    i : ^iwhen^i<^m
    mtx : Matrix<'a, ^m, ^n>

Returns: Vector<'a, ^n>

You can also use `Matrix.Row.AsVector mtx`.

i : ^iwhen^i<^m
mtx : Matrix<'a, ^m, ^n>
Returns: Vector<'a, ^n>

slice rowStart rowEnd colStart colEnd mat

Full Usage: slice rowStart rowEnd colStart colEnd mat

Parameters:
    rowStart : ^awhen^a<^m
    rowEnd : ^bwhen^a<=^b<^m
    colStart : ^cwhen^c<^n
    colEnd : ^dwhen^c<=^d<^n
    mat : Matrix<'t, ^m, ^n>

Returns: Matrix<'t, S<^b-^a>, S<^d-^c>>

You can also use `Matrix.Slice.Invoke mat`.

rowStart : ^awhen^a<^m
rowEnd : ^bwhen^a<=^b<^m
colStart : ^cwhen^c<^n
colEnd : ^dwhen^c<=^d<^n
mat : Matrix<'t, ^m, ^n>
Returns: Matrix<'t, S<^b-^a>, S<^d-^c>>

sliceCol colStart colEnd mat

Full Usage: sliceCol colStart colEnd mat

Parameters:
    colStart : ^cwhen^c<^n
    colEnd : ^dwhen^c<=^d<^n
    mat : Matrix<'t, ^m, ^n>

Returns: Matrix<'t, ^m, S<^d-^c>>

You can also use `Matrix.SliceCol.Invoke mat`.

colStart : ^cwhen^c<^n
colEnd : ^dwhen^c<=^d<^n
mat : Matrix<'t, ^m, ^n>
Returns: Matrix<'t, ^m, S<^d-^c>>

sliceRow rowStart rowEnd mat

Full Usage: sliceRow rowStart rowEnd mat

Parameters:
    rowStart : ^awhen^a<^m
    rowEnd : ^bwhen^a<=^b<^m
    mat : Matrix<'t, ^m, ^n>

Returns: Matrix<'t, S<^b-^a>, ^n>

You can also use `Matrix.SliceRow.Invoke mat`.

rowStart : ^awhen^a<^m
rowEnd : ^bwhen^a<=^b<^m
mat : Matrix<'t, ^m, ^n>
Returns: Matrix<'t, S<^b-^a>, ^n>

toArray2D m

Full Usage: toArray2D m

Parameters:
Returns: 'a[,]

m : Matrix<'a, 'm, 'n>
Returns: 'a[,]

toCols mtx

Full Usage: toCols mtx

Parameters:
Returns: Vector<Vector<'a, ^m>, ^n>

mtx : Matrix<'a, ^m, ^n>
Returns: Vector<Vector<'a, ^m>, ^n>

toJaggedArray m

Full Usage: toJaggedArray m

Parameters:
Returns: 'a[][]

m : Matrix<'a, 'm, 'n>
Returns: 'a[][]

toRows mtx

Full Usage: toRows mtx

Parameters:
Returns: Vector<Vector<'a, ^n>, ^m>

mtx : Matrix<'a, ^m, ^n>
Returns: Vector<Vector<'a, ^n>, ^m>

trace mtx

Full Usage: trace mtx

Parameters:
Returns: ^a

mtx : Matrix<^a, 'n, 'n>
Returns: ^a

transpose mtx

Full Usage: transpose mtx

Parameters:
Returns: Matrix<'t, ^n, ^m>

mtx : Matrix<'t, ^m, ^n>
Returns: Matrix<'t, ^n, ^m>

tryOfArray2D row column items

Full Usage: tryOfArray2D row column items

Parameters:
    row : ^m
    column : ^n
    items : 'a[,]

Returns: Matrix<'a, ^m, ^n> option

Tries to create a matrix of given dimension. If the dimension does not match, returns `None`. Otherwise returns the matrix with `Some`. You can also use `Matrix.TryCreate.OfArray2D`.

row : ^m
column : ^n
items : 'a[,]
Returns: Matrix<'a, ^m, ^n> option

tryOfJaggedSeq row column items

Full Usage: tryOfJaggedSeq row column items

Parameters:
    row : ^m
    column : ^n
    items : seq<'a>

Returns: Matrix<'b, ^m, ^n> option

Tries to create a matrix of given dimension. If the dimension does not match, returns `None`. Otherwise returns the matrix with `Some`. You can also use `Matrix.TryCreate.OfJaggedSeq`.

row : ^m
column : ^n
items : seq<'a>
Returns: Matrix<'b, ^m, ^n> option

unsafeCreate _row _column items

Full Usage: unsafeCreate _row _column items

Parameters:
    _row : 'm
    _column : 'n
    items : 'a[,]

Returns: Matrix<'a, 'm, 'n>

_row : 'm
_column : 'n
items : 'a[,]
Returns: Matrix<'a, 'm, 'n>

unsafeGet i j m

Full Usage: unsafeGet i j m

Parameters:
    i : int
    j : int
    m : Matrix<'a, 'm, 'n>

Returns: 'a

i : int
j : int
m : Matrix<'a, 'm, 'n>
Returns: 'a

verticalSum m1 m2

Full Usage: verticalSum m1 m2

Parameters:
Returns: Matrix<'t, ^m1+^m2, ^n>

m1 : Matrix<'t, ^m1, ^n>
m2 : Matrix<'t, ^m2, ^n>
Returns: Matrix<'t, ^m1+^m2, ^n>

zero

Full Usage: zero

Returns: Matrix<^a, ^m, ^n>

Returns: Matrix<^a, ^m, ^n>

zeroCreate m n

Full Usage: zeroCreate m n

Parameters:
    m : ^m
    n : ^n

Returns: Matrix<'a, ^m, ^n>

You can also use `Matrix.ZeroCreate.Invoke()`.

m : ^m
n : ^n
Returns: Matrix<'a, ^m, ^n>