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

Detailed Description

Definition at line 299 of file sparse.h.

#include <sparse.h>

Inheritance diagram for operations_research::glop::CompactSparseMatrix:
operations_research::glop::TriangularMatrix

Classes

class  ConstView

Public Member Functions

 CompactSparseMatrix ()=default
ConstView view () const
 CompactSparseMatrix (const SparseMatrix &matrix)
 CompactSparseMatrix (const CompactSparseMatrix &)=delete
CompactSparseMatrixoperator= (const CompactSparseMatrix &)=delete
void PopulateFromMatrixView (const MatrixView &input)
void PopulateFromSparseMatrixAndAddSlacks (const SparseMatrix &input)
void PopulateFromTranspose (const CompactSparseMatrix &input)
void Reset (RowIndex num_rows)
void AddEntryToCurrentColumn (RowIndex row, Fractional coeff)
void CloseCurrentColumn ()
ColIndex AddDenseColumn (const DenseColumn &dense_column)
ColIndex AddDenseColumnPrefix (DenseColumn::ConstView dense_column, RowIndex start)
ColIndex AddDenseColumnWithNonZeros (const DenseColumn &dense_column, absl::Span< const RowIndex > non_zeros)
ColIndex AddAndClearColumnWithNonZeros (DenseColumn *column, std::vector< RowIndex > *non_zeros)
EntryIndex ColumnNumEntries (ColIndex col) const
EntryIndex num_entries () const
RowIndex num_rows () const
ColIndex num_cols () const
bool IsEmpty () const
ColumnView column (ColIndex col) const
bool ColumnIsEmpty (ColIndex col) const
Fractional ColumnScalarProduct (ColIndex col, const DenseRow &vector) const
void ColumnAddMultipleToDenseColumn (ColIndex col, Fractional multiplier, DenseColumn::View dense_column) const
void ColumnAddMultipleToDenseColumn (ColIndex col, Fractional multiplier, DenseColumn *dense_column) const
void ColumnAddMultipleToSparseScatteredColumn (ColIndex col, Fractional multiplier, ScatteredColumn *column) const
void ColumnCopyToDenseColumn (ColIndex col, DenseColumn *dense_column) const
void ColumnCopyToClearedDenseColumn (ColIndex col, DenseColumn *dense_column) const
void ColumnCopyToClearedDenseColumnWithNonZeros (ColIndex col, DenseColumn *dense_column, RowIndexVector *non_zeros) const
void Swap (CompactSparseMatrix *other)

Protected Member Functions

::util::IntegerRange< EntryIndex > Column (ColIndex col) const

Protected Attributes

RowIndex num_rows_
ColIndex num_cols_
StrictITIVector< EntryIndex, Fractionalcoefficients_
StrictITIVector< EntryIndex, RowIndex > rows_
StrictITIVector< ColIndex, EntryIndex > starts_

Constructor & Destructor Documentation

◆ CompactSparseMatrix() [1/3]

operations_research::glop::CompactSparseMatrix::CompactSparseMatrix ( )
default

◆ CompactSparseMatrix() [2/3]

operations_research::glop::CompactSparseMatrix::CompactSparseMatrix ( const SparseMatrix & matrix)
inlineexplicit

Definition at line 346 of file sparse.h.

◆ CompactSparseMatrix() [3/3]

operations_research::glop::CompactSparseMatrix::CompactSparseMatrix ( const CompactSparseMatrix & )
delete

Member Function Documentation

◆ AddAndClearColumnWithNonZeros()

ColIndex operations_research::glop::CompactSparseMatrix::AddAndClearColumnWithNonZeros ( DenseColumn * column,
std::vector< RowIndex > * non_zeros )

Definition at line 626 of file sparse.cc.

◆ AddDenseColumn()

ColIndex operations_research::glop::CompactSparseMatrix::AddDenseColumn ( const DenseColumn & dense_column)

Definition at line 593 of file sparse.cc.

◆ AddDenseColumnPrefix()

ColIndex operations_research::glop::CompactSparseMatrix::AddDenseColumnPrefix ( DenseColumn::ConstView dense_column,
RowIndex start )

Definition at line 597 of file sparse.cc.

◆ AddDenseColumnWithNonZeros()

ColIndex operations_research::glop::CompactSparseMatrix::AddDenseColumnWithNonZeros ( const DenseColumn & dense_column,
absl::Span< const RowIndex > non_zeros )

Definition at line 611 of file sparse.cc.

◆ AddEntryToCurrentColumn()

void operations_research::glop::CompactSparseMatrix::AddEntryToCurrentColumn ( RowIndex row,
Fractional coeff )

Definition at line 582 of file sparse.cc.

◆ CloseCurrentColumn()

void operations_research::glop::CompactSparseMatrix::CloseCurrentColumn ( )

Definition at line 588 of file sparse.cc.

◆ Column()

::util::IntegerRange< EntryIndex > operations_research::glop::CompactSparseMatrix::Column ( ColIndex col) const
inlineprotected

Definition at line 515 of file sparse.h.

◆ column()

ColumnView operations_research::glop::CompactSparseMatrix::column ( ColIndex col) const
inline

Definition at line 419 of file sparse.h.

◆ ColumnAddMultipleToDenseColumn() [1/2]

void operations_research::glop::CompactSparseMatrix::ColumnAddMultipleToDenseColumn ( ColIndex col,
Fractional multiplier,
DenseColumn * dense_column ) const
inline

Definition at line 453 of file sparse.h.

◆ ColumnAddMultipleToDenseColumn() [2/2]

void operations_research::glop::CompactSparseMatrix::ColumnAddMultipleToDenseColumn ( ColIndex col,
Fractional multiplier,
DenseColumn::View dense_column ) const
inline

Definition at line 444 of file sparse.h.

◆ ColumnAddMultipleToSparseScatteredColumn()

void operations_research::glop::CompactSparseMatrix::ColumnAddMultipleToSparseScatteredColumn ( ColIndex col,
Fractional multiplier,
ScatteredColumn * column ) const
inline

Definition at line 462 of file sparse.h.

◆ ColumnCopyToClearedDenseColumn()

void operations_research::glop::CompactSparseMatrix::ColumnCopyToClearedDenseColumn ( ColIndex col,
DenseColumn * dense_column ) const
inline

Definition at line 484 of file sparse.h.

◆ ColumnCopyToClearedDenseColumnWithNonZeros()

void operations_research::glop::CompactSparseMatrix::ColumnCopyToClearedDenseColumnWithNonZeros ( ColIndex col,
DenseColumn * dense_column,
RowIndexVector * non_zeros ) const
inline

Definition at line 496 of file sparse.h.

◆ ColumnCopyToDenseColumn()

void operations_research::glop::CompactSparseMatrix::ColumnCopyToDenseColumn ( ColIndex col,
DenseColumn * dense_column ) const
inline

Definition at line 476 of file sparse.h.

◆ ColumnIsEmpty()

bool operations_research::glop::CompactSparseMatrix::ColumnIsEmpty ( ColIndex col) const
inline

Definition at line 431 of file sparse.h.

◆ ColumnNumEntries()

EntryIndex operations_research::glop::CompactSparseMatrix::ColumnNumEntries ( ColIndex col) const
inline

Definition at line 399 of file sparse.h.

◆ ColumnScalarProduct()

Fractional operations_research::glop::CompactSparseMatrix::ColumnScalarProduct ( ColIndex col,
const DenseRow & vector ) const
inline

Definition at line 437 of file sparse.h.

◆ IsEmpty()

bool operations_research::glop::CompactSparseMatrix::IsEmpty ( ) const
inline

Definition at line 412 of file sparse.h.

◆ num_cols()

ColIndex operations_research::glop::CompactSparseMatrix::num_cols ( ) const
inline

Definition at line 409 of file sparse.h.

◆ num_entries()

EntryIndex operations_research::glop::CompactSparseMatrix::num_entries ( ) const
inline

Definition at line 404 of file sparse.h.

◆ num_rows()

RowIndex operations_research::glop::CompactSparseMatrix::num_rows ( ) const
inline

Definition at line 408 of file sparse.h.

◆ operator=()

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

◆ PopulateFromMatrixView()

void operations_research::glop::CompactSparseMatrix::PopulateFromMatrixView ( const MatrixView & input)

Definition at line 447 of file sparse.cc.

◆ PopulateFromSparseMatrixAndAddSlacks()

void operations_research::glop::CompactSparseMatrix::PopulateFromSparseMatrixAndAddSlacks ( const SparseMatrix & input)

Definition at line 466 of file sparse.cc.

◆ PopulateFromTranspose()

void operations_research::glop::CompactSparseMatrix::PopulateFromTranspose ( const CompactSparseMatrix & input)

Definition at line 495 of file sparse.cc.

◆ Reset()

void operations_research::glop::CompactSparseMatrix::Reset ( RowIndex num_rows)

Definition at line 561 of file sparse.cc.

◆ Swap()

void operations_research::glop::CompactSparseMatrix::Swap ( CompactSparseMatrix * other)

Definition at line 642 of file sparse.cc.

◆ view()

ConstView operations_research::glop::CompactSparseMatrix::view ( ) const
inline

Definition at line 342 of file sparse.h.

Member Data Documentation

◆ coefficients_

StrictITIVector<EntryIndex, Fractional> operations_research::glop::CompactSparseMatrix::coefficients_
protected

Definition at line 526 of file sparse.h.

◆ num_cols_

ColIndex operations_research::glop::CompactSparseMatrix::num_cols_
protected

Definition at line 521 of file sparse.h.

◆ num_rows_

RowIndex operations_research::glop::CompactSparseMatrix::num_rows_
protected

Definition at line 520 of file sparse.h.

◆ rows_

StrictITIVector<EntryIndex, RowIndex> operations_research::glop::CompactSparseMatrix::rows_
protected

Definition at line 527 of file sparse.h.

◆ starts_

StrictITIVector<ColIndex, EntryIndex> operations_research::glop::CompactSparseMatrix::starts_
protected

Definition at line 528 of file sparse.h.


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