OR-Tools  8.2
SparseMatrix

Detailed Description

Definition at line 61 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 87 of file sparse.cc.

◆ SparseMatrix() [2/2]

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

Definition at line 90 of file sparse.cc.

Member Function Documentation

◆ AppendEmptyColumn()

ColIndex AppendEmptyColumn ( )

Definition at line 145 of file sparse.cc.

◆ AppendRowsFromSparseMatrix()

bool AppendRowsFromSparseMatrix ( const SparseMatrix matrix)

Definition at line 302 of file sparse.cc.

◆ AppendUnitVector()

void AppendUnitVector ( RowIndex  row,
Fractional  value 
)

Definition at line 151 of file sparse.cc.

◆ ApplyRowPermutation()

void ApplyRowPermutation ( const RowPermutation row_perm)

Definition at line 316 of file sparse.cc.

◆ CheckNoDuplicates()

bool CheckNoDuplicates ( ) const

Definition at line 126 of file sparse.cc.

◆ CleanUp()

void CleanUp ( )

Definition at line 119 of file sparse.cc.

◆ Clear()

void Clear ( )

Definition at line 110 of file sparse.cc.

◆ column()

const SparseColumn& column ( ColIndex  col) const
inline

Definition at line 180 of file sparse.h.

◆ ComputeInfinityNorm()

Fractional ComputeInfinityNorm ( ) const

Definition at line 395 of file sparse.cc.

◆ ComputeMinAndMaxMagnitudes()

void ComputeMinAndMaxMagnitudes ( Fractional min_magnitude,
Fractional max_magnitude 
) const

Definition at line 369 of file sparse.cc.

◆ ComputeOneNorm()

Fractional ComputeOneNorm ( ) const

Definition at line 392 of file sparse.cc.

◆ DeleteColumns()

void DeleteColumns ( const DenseBooleanRow columns_to_delete)

Definition at line 276 of file sparse.cc.

◆ DeleteRows()

void DeleteRows ( RowIndex  num_rows,
const RowPermutation permutation 
)

Definition at line 289 of file sparse.cc.

◆ Dump()

std::string Dump ( ) const

Definition at line 399 of file sparse.cc.

◆ Equals()

bool Equals ( const SparseMatrix a,
Fractional  tolerance 
) const

Definition at line 327 of file sparse.cc.

◆ IsCleanedUp()

bool IsCleanedUp ( ) const

Definition at line 135 of file sparse.cc.

◆ IsEmpty()

bool IsEmpty ( ) const

Definition at line 115 of file sparse.cc.

◆ LookUpValue()

Fractional LookUpValue ( RowIndex  row,
ColIndex  col 
) const

Definition at line 323 of file sparse.cc.

◆ mutable_column()

SparseColumn* mutable_column ( ColIndex  col)
inline

Definition at line 181 of file sparse.h.

◆ num_cols()

ColIndex num_cols ( ) const
inline

Definition at line 177 of file sparse.h.

◆ num_entries()

EntryIndex num_entries ( ) const

Definition at line 389 of file sparse.cc.

◆ num_rows()

RowIndex num_rows ( ) const
inline

Definition at line 176 of file sparse.h.

◆ PopulateFromIdentity()

void PopulateFromIdentity ( ColIndex  num_cols)

Definition at line 172 of file sparse.cc.

◆ PopulateFromLinearCombination()

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

Definition at line 225 of file sparse.cc.

◆ PopulateFromPermutedMatrix()

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

Definition at line 212 of file sparse.cc.

◆ PopulateFromProduct()

void PopulateFromProduct ( const SparseMatrix a,
const SparseMatrix b 
)

Definition at line 250 of file sparse.cc.

◆ PopulateFromSparseMatrix()

void PopulateFromSparseMatrix ( const SparseMatrix matrix)

Definition at line 206 of file sparse.cc.

◆ PopulateFromTranspose()

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

Definition at line 181 of file sparse.cc.

◆ PopulateFromZero()

void PopulateFromZero ( RowIndex  num_rows,
ColIndex  num_cols 
)

Definition at line 164 of file sparse.cc.

◆ SetNumRows()

void SetNumRows ( RowIndex  num_rows)

Definition at line 143 of file sparse.cc.

◆ Swap()

void Swap ( SparseMatrix matrix)

Definition at line 158 of file sparse.cc.


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