OR-Tools  9.6
SparseMatrix

Detailed Description

Definition at line 64 of file sparse.h.

Public Member Functions

 SparseMatrix ()
 
 SparseMatrix (std::initializer_list< std::initializer_list< Fractional >> init_list)
 
void Clear ()
 
bool IsEmpty () const
 
void CleanUp ()
 
bool CheckNoDuplicates () const
 
bool IsCleanedUp () const
 
void SetNumRows (RowIndex num_rows)
 
ColIndex AppendEmptyColumn ()
 
void AppendUnitVector (RowIndex row, Fractional value)
 
void Swap (SparseMatrix *matrix)
 
void PopulateFromZero (RowIndex num_rows, ColIndex num_cols)
 
void PopulateFromIdentity (ColIndex num_cols)
 
template<typename Matrix >
void PopulateFromTranspose (const Matrix &input)
 
void PopulateFromSparseMatrix (const SparseMatrix &matrix)
 
template<typename Matrix >
void PopulateFromPermutedMatrix (const Matrix &a, const RowPermutation &row_perm, const ColumnPermutation &inverse_col_perm)
 
void PopulateFromLinearCombination (Fractional alpha, const SparseMatrix &a, Fractional beta, const SparseMatrix &b)
 
void PopulateFromProduct (const SparseMatrix &a, const SparseMatrix &b)
 
void DeleteColumns (const DenseBooleanRow &columns_to_delete)
 
void DeleteRows (RowIndex num_rows, const RowPermutation &permutation)
 
bool AppendRowsFromSparseMatrix (const SparseMatrix &matrix)
 
void ApplyRowPermutation (const RowPermutation &row_perm)
 
Fractional LookUpValue (RowIndex row, ColIndex col) const
 
bool Equals (const SparseMatrix &a, Fractional tolerance) const
 
void ComputeMinAndMaxMagnitudes (Fractional *min_magnitude, Fractional *max_magnitude) const
 
RowIndex num_rows () const
 
ColIndex num_cols () const
 
const SparseColumncolumn (ColIndex col) const
 
SparseColumnmutable_column (ColIndex col)
 
EntryIndex num_entries () const
 
Fractional ComputeOneNorm () const
 
Fractional ComputeInfinityNorm () const
 
std::string Dump () const
 

Constructor & Destructor Documentation

◆ SparseMatrix() [1/2]

Definition at line 92 of file sparse.cc.

◆ SparseMatrix() [2/2]

SparseMatrix ( std::initializer_list< std::initializer_list< Fractional >>  init_list)

Definition at line 95 of file sparse.cc.

Member Function Documentation

◆ AppendEmptyColumn()

ColIndex AppendEmptyColumn ( )

Definition at line 150 of file sparse.cc.

◆ AppendRowsFromSparseMatrix()

bool AppendRowsFromSparseMatrix ( const SparseMatrix matrix)

Definition at line 307 of file sparse.cc.

◆ AppendUnitVector()

void AppendUnitVector ( RowIndex  row,
Fractional  value 
)

Definition at line 156 of file sparse.cc.

◆ ApplyRowPermutation()

void ApplyRowPermutation ( const RowPermutation row_perm)

Definition at line 321 of file sparse.cc.

◆ CheckNoDuplicates()

bool CheckNoDuplicates ( ) const

Definition at line 131 of file sparse.cc.

◆ CleanUp()

void CleanUp ( )

Definition at line 124 of file sparse.cc.

◆ Clear()

void Clear ( )

Definition at line 115 of file sparse.cc.

◆ column()

const SparseColumn& column ( ColIndex  col) const
inline

Definition at line 183 of file sparse.h.

◆ ComputeInfinityNorm()

Fractional ComputeInfinityNorm ( ) const

Definition at line 400 of file sparse.cc.

◆ ComputeMinAndMaxMagnitudes()

void ComputeMinAndMaxMagnitudes ( Fractional min_magnitude,
Fractional max_magnitude 
) const

Definition at line 374 of file sparse.cc.

◆ ComputeOneNorm()

Fractional ComputeOneNorm ( ) const

Definition at line 397 of file sparse.cc.

◆ DeleteColumns()

void DeleteColumns ( const DenseBooleanRow columns_to_delete)

Definition at line 281 of file sparse.cc.

◆ DeleteRows()

void DeleteRows ( RowIndex  num_rows,
const RowPermutation permutation 
)

Definition at line 294 of file sparse.cc.

◆ Dump()

std::string Dump ( ) const

Definition at line 404 of file sparse.cc.

◆ Equals()

bool Equals ( const SparseMatrix a,
Fractional  tolerance 
) const

Definition at line 332 of file sparse.cc.

◆ IsCleanedUp()

bool IsCleanedUp ( ) const

Definition at line 140 of file sparse.cc.

◆ IsEmpty()

bool IsEmpty ( ) const

Definition at line 120 of file sparse.cc.

◆ LookUpValue()

Fractional LookUpValue ( RowIndex  row,
ColIndex  col 
) const

Definition at line 328 of file sparse.cc.

◆ mutable_column()

SparseColumn* mutable_column ( ColIndex  col)
inline

Definition at line 184 of file sparse.h.

◆ num_cols()

ColIndex num_cols ( ) const
inline

Definition at line 180 of file sparse.h.

◆ num_entries()

EntryIndex num_entries ( ) const

Definition at line 394 of file sparse.cc.

◆ num_rows()

RowIndex num_rows ( ) const
inline

Definition at line 179 of file sparse.h.

◆ PopulateFromIdentity()

void PopulateFromIdentity ( ColIndex  num_cols)

Definition at line 177 of file sparse.cc.

◆ PopulateFromLinearCombination()

void PopulateFromLinearCombination ( Fractional  alpha,
const SparseMatrix a,
Fractional  beta,
const SparseMatrix b 
)

Definition at line 230 of file sparse.cc.

◆ PopulateFromPermutedMatrix()

template void PopulateFromPermutedMatrix< CompactSparseMatrixView > ( const Matrix &  a,
const RowPermutation row_perm,
const ColumnPermutation inverse_col_perm 
)

Definition at line 217 of file sparse.cc.

◆ PopulateFromProduct()

void PopulateFromProduct ( const SparseMatrix a,
const SparseMatrix b 
)

Definition at line 255 of file sparse.cc.

◆ PopulateFromSparseMatrix()

void PopulateFromSparseMatrix ( const SparseMatrix matrix)

Definition at line 211 of file sparse.cc.

◆ PopulateFromTranspose()

template void PopulateFromTranspose< SparseMatrix > ( const Matrix &  input)

Definition at line 186 of file sparse.cc.

◆ PopulateFromZero()

void PopulateFromZero ( RowIndex  num_rows,
ColIndex  num_cols 
)

Definition at line 169 of file sparse.cc.

◆ SetNumRows()

void SetNumRows ( RowIndex  num_rows)

Definition at line 148 of file sparse.cc.

◆ Swap()

void Swap ( SparseMatrix matrix)

Definition at line 163 of file sparse.cc.


The documentation for this class was generated from the following files: