nuget server logo nuget api documents
↑

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

SparseTableauRow

Full name Microsoft.VisualBasic.Math.LinearAlgebra.LinearProgramming.SparseTableauRow Assembly Microsoft.VisualBasic.Math.Core Members 15

A single row in the simplex tableau, stored in the sparse format.

00 Remarks

The column index in SparseTableauRow.Idx is always kept in ascending order, so that:

  1. the element lookup can be done via the binary search method
  2. the row merge operation (AXPY) can be done via a forward merge into a spare buffer, and then the buffers are swapped: there is no array copy and no extra allocation is required by this operation (the ping-pong buffer).

01 Syntax

Microsoft.VisualBasic.Math.LinearAlgebra.LinearProgramming.SparseTableauRow

02 Methods

NameOverloadsSummary
Add 1 append a new non-zero element at the end of this row, the given col should be greater than the last column index in this row.
Item 1 get the element value at the given column index
Scale 1 this row = this row * factor
Axpy 1 this row = this row - factor * other
RemoveFrom 1 removes all of the columns which index is greater than or equals to the given minCol from this row.
Compress 1 remove all of the tiny value in this row
ToString 1

03 Fields

NameOverloadsSummary
Idx 2 the column index of each non-zero element, in ascending order
Val 2 the value of each non-zero element
Count 2 the number of the non-zero elements in this row
idxB 1 the spare buffer of SparseTableauRow.Idx
valB 1 the spare buffer of SparseTableauRow.Val

04 Members

method Add #
Add(Int32, Double)

append a new non-zero element at the end of this row, the given col should be greater than the last column index in this row.

method Item #
Item(Int32)

get the element value at the given column index

Returns

zero when the given column is a structural zero

method Scale #
Scale(Double, Double)

this row = this row factor*

Parameters
NameTypeDescription
dropTolDouble

the tiny value will be removed from this row

method Axpy #
Axpy(SparseTableauRow, Double, Double)

this row = this row - factor other*

Remarks

a forward merge into the spare buffer is applied by this operation, then the spare buffer is swapped with the row buffer, so that there is no array copy cost on this operation.

Parameters
NameTypeDescription
otherSparseTableauRow

the pivot row, which is already scaled

factorDouble

-

dropTolDouble

-

method RemoveFrom #
RemoveFrom(Int32)

removes all of the columns which index is greater than or equals to the given minCol from this row.

Parameters
NameTypeDescription
minColInt32

-

Returns

the number of the removed elements

method Compress #
Compress(Double)

remove all of the tiny value in this row

field Idx #
Idx

the column index of each non-zero element, in ascending order

field Val #
Val

the value of each non-zero element

field Count #
Count

the number of the non-zero elements in this row

field idxB #
idxB

the spare buffer of SparseTableauRow.Idx

field valB #
valB

the spare buffer of SparseTableauRow.Val

field Idx overload 2 #
Idx
field Val overload 2 #
Val
field Count overload 2 #
Count
method ToString #
ToString()