Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SparseMatrix Class Reference

Detailed Description

Definition at line 69 of file sparse.h.

#include <sparse.h>

Public Member Functions

 SparseMatrix ()
 SparseMatrix (std::initializer_list< std::initializer_list< Fractional > > init_list)
 SparseMatrix (const SparseMatrix &)=delete
SparseMatrixoperator= (const SparseMatrix &)=delete
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/3]

◆ SparseMatrix() [2/3]

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

Definition at line 100 of file sparse.cc.

◆ SparseMatrix() [3/3]

Member Function Documentation

◆ AppendEmptyColumn()

◆ AppendRowsFromSparseMatrix()

◆ AppendUnitVector()

Definition at line 161 of file sparse.cc.

◆ ApplyRowPermutation()

void operations_research::glop::SparseMatrix::ApplyRowPermutation ( const RowPermutation & row_perm)

Definition at line 326 of file sparse.cc.

◆ CheckNoDuplicates()

Definition at line 136 of file sparse.cc.

◆ CleanUp()

Definition at line 129 of file sparse.cc.

◆ Clear()

Definition at line 120 of file sparse.cc.

◆ column()

const SparseColumn & operations_research::glop::SparseMatrix::column ( ColIndex col) const
inline

Definition at line 193 of file sparse.h.

◆ ComputeInfinityNorm()

◆ ComputeMinAndMaxMagnitudes()

Definition at line 379 of file sparse.cc.

◆ ComputeOneNorm()

◆ DeleteColumns()

void operations_research::glop::SparseMatrix::DeleteColumns ( const DenseBooleanRow & columns_to_delete)

Definition at line 286 of file sparse.cc.

◆ DeleteRows()

void operations_research::glop::SparseMatrix::DeleteRows ( RowIndex num_rows,
const RowPermutation & permutation )

Definition at line 299 of file sparse.cc.

◆ Dump()

Definition at line 409 of file sparse.cc.

◆ Equals()

Definition at line 337 of file sparse.cc.

◆ IsCleanedUp()

Definition at line 145 of file sparse.cc.

◆ IsEmpty()

Definition at line 125 of file sparse.cc.

◆ LookUpValue()

Definition at line 333 of file sparse.cc.

◆ mutable_column()

Definition at line 194 of file sparse.h.

◆ num_cols()

Definition at line 190 of file sparse.h.

◆ num_entries()

Definition at line 399 of file sparse.cc.

◆ num_rows()

Definition at line 189 of file sparse.h.

◆ operator=()

SparseMatrix & operations_research::glop::SparseMatrix::operator= ( const SparseMatrix & )
delete

◆ PopulateFromIdentity()

Definition at line 182 of file sparse.cc.

◆ PopulateFromLinearCombination()

◆ PopulateFromPermutedMatrix()

template<typename Matrix>
template void operations_research::glop::SparseMatrix::PopulateFromPermutedMatrix< CompactSparseMatrixView > ( const Matrix & a,
const RowPermutation & row_perm,
const ColumnPermutation & inverse_col_perm )

Definition at line 222 of file sparse.cc.

◆ PopulateFromProduct()

Definition at line 260 of file sparse.cc.

◆ PopulateFromSparseMatrix()

◆ PopulateFromTranspose()

template<typename Matrix>
template void operations_research::glop::SparseMatrix::PopulateFromTranspose< SparseMatrix > ( const Matrix & input)

Definition at line 191 of file sparse.cc.

◆ PopulateFromZero()

void operations_research::glop::SparseMatrix::PopulateFromZero ( RowIndex num_rows,
ColIndex num_cols )

Definition at line 174 of file sparse.cc.

◆ SetNumRows()

Definition at line 153 of file sparse.cc.

◆ Swap()

Definition at line 168 of file sparse.cc.


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