nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.Core / LpSparseMatrix

LpSparseMatrix

Full name Microsoft.VisualBasic.Math.LinearAlgebra.LinearProgramming.LpSparseMatrix Assembly Microsoft.VisualBasic.Math.Core Members 16

A sparse matrix in the compressed sparse row(CSR) format.

00 Remarks

This matrix object is specially designed for the large scale linear programming problem, example as the FBA problem of the genome scale metabolic network: the stoichiometric matrix of a GEM model is a highly sparse matrix, so that a dense matrix storage in such a large scale problem will run out of the memory.

The column index in each row is always kept in ascending order, so that the element lookup in a row can be done via binary search.

01 Syntax

Microsoft.VisualBasic.Math.LinearAlgebra.LinearProgramming.LpSparseMatrix

02 Methods

NameOverloadsSummary
FromJagged 1 create a sparse matrix from a dense jagged matrix
FromTriplets 1 create a sparse matrix from the triplet data
Empty 1 the empty matrix
ToJagged 1 expands the sparse matrix as a dense jagged matrix, note that this operation may cost a lot of memory in a large scale problem
ToString 1

03 Properties

NameOverloadsSummary
NonZeros 1 the number of the non-zero elements in this matrix

04 Fields

NameOverloadsSummary
Rows 2 number of the constraint rows
Columns 2 number of the variables
RowPtr 2 row pointer, the length is LpSparseMatrix.Rows + 1
ColIdx 2 the column index of each non-zero element
Values 2 the value of each non-zero element

05 Members

method FromJagged #
FromJagged(Double()())

create a sparse matrix from a dense jagged matrix

Parameters
NameTypeDescription
jaggedDouble()()

-

method FromTriplets #
FromTriplets(Int32, Int32, Int32(), Int32(), Double())

create a sparse matrix from the triplet data

method Empty #
Empty

the empty matrix

method ToJagged #
ToJagged

expands the sparse matrix as a dense jagged matrix, note that this operation may cost a lot of memory in a large scale problem

property NonZeros #
NonZeros

the number of the non-zero elements in this matrix

field Rows #
Rows

number of the constraint rows

field Columns #
Columns

number of the variables

field RowPtr #
RowPtr

row pointer, the length is LpSparseMatrix.Rows + 1

field ColIdx #
ColIdx

the column index of each non-zero element

field Values #
Values

the value of each non-zero element

field Rows overload 2 #
Rows
field Columns overload 2 #
Columns
field RowPtr overload 2 #
RowPtr
field ColIdx overload 2 #
ColIdx
field Values overload 2 #
Values
method ToString #
ToString()