OR-Tools  8.2
CompactSparseMatrix

Detailed Description

Definition at line 288 of file sparse.h.

Public Member Functions

 CompactSparseMatrix ()
 
 CompactSparseMatrix (const SparseMatrix &matrix)
 
void PopulateFromMatrixView (const MatrixView &input)
 
void PopulateFromTranspose (const CompactSparseMatrix &input)
 
void Reset (RowIndex num_rows)
 
ColIndex AddDenseColumn (const DenseColumn &dense_column)
 
ColIndex AddDenseColumnPrefix (const DenseColumn &dense_column, RowIndex start)
 
ColIndex AddDenseColumnWithNonZeros (const DenseColumn &dense_column, const std::vector< 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
 
::util::IntegerRange< EntryIndex > Column (ColIndex col) const
 
Fractional EntryCoefficient (EntryIndex i) const
 
RowIndex EntryRow (EntryIndex i) 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 *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 Attributes

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

Constructor & Destructor Documentation

◆ CompactSparseMatrix() [1/2]

CompactSparseMatrix ( )
inline

Definition at line 290 of file sparse.h.

◆ CompactSparseMatrix() [2/2]

CompactSparseMatrix ( const SparseMatrix matrix)
inlineexplicit

Definition at line 294 of file sparse.h.

Member Function Documentation

◆ AddAndClearColumnWithNonZeros()

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

Definition at line 569 of file sparse.cc.

◆ AddDenseColumn()

ColIndex AddDenseColumn ( const DenseColumn dense_column)

Definition at line 536 of file sparse.cc.

◆ AddDenseColumnPrefix()

ColIndex AddDenseColumnPrefix ( const DenseColumn dense_column,
RowIndex  start 
)

Definition at line 540 of file sparse.cc.

◆ AddDenseColumnWithNonZeros()

ColIndex AddDenseColumnWithNonZeros ( const DenseColumn dense_column,
const std::vector< RowIndex > &  non_zeros 
)

Definition at line 554 of file sparse.cc.

◆ Column()

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

Definition at line 358 of file sparse.h.

◆ column()

ColumnView column ( ColIndex  col) const
inline

Definition at line 364 of file sparse.h.

◆ ColumnAddMultipleToDenseColumn()

void ColumnAddMultipleToDenseColumn ( ColIndex  col,
Fractional  multiplier,
DenseColumn dense_column 
) const
inline

Definition at line 393 of file sparse.h.

◆ ColumnAddMultipleToSparseScatteredColumn()

void ColumnAddMultipleToSparseScatteredColumn ( ColIndex  col,
Fractional  multiplier,
ScatteredColumn column 
) const
inline

Definition at line 405 of file sparse.h.

◆ ColumnCopyToClearedDenseColumn()

void ColumnCopyToClearedDenseColumn ( ColIndex  col,
DenseColumn dense_column 
) const
inline

Definition at line 426 of file sparse.h.

◆ ColumnCopyToClearedDenseColumnWithNonZeros()

void ColumnCopyToClearedDenseColumnWithNonZeros ( ColIndex  col,
DenseColumn dense_column,
RowIndexVector non_zeros 
) const
inline

Definition at line 436 of file sparse.h.

◆ ColumnCopyToDenseColumn()

void ColumnCopyToDenseColumn ( ColIndex  col,
DenseColumn dense_column 
) const
inline

Definition at line 418 of file sparse.h.

◆ ColumnIsEmpty()

bool ColumnIsEmpty ( ColIndex  col) const
inline

Definition at line 376 of file sparse.h.

◆ ColumnNumEntries()

EntryIndex ColumnNumEntries ( ColIndex  col) const
inline

Definition at line 335 of file sparse.h.

◆ ColumnScalarProduct()

Fractional ColumnScalarProduct ( ColIndex  col,
const DenseRow vector 
) const
inline

Definition at line 382 of file sparse.h.

◆ EntryCoefficient()

Fractional EntryCoefficient ( EntryIndex  i) const
inline

Definition at line 361 of file sparse.h.

◆ EntryRow()

RowIndex EntryRow ( EntryIndex  i) const
inline

Definition at line 362 of file sparse.h.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 348 of file sparse.h.

◆ num_cols()

ColIndex num_cols ( ) const
inline

Definition at line 345 of file sparse.h.

◆ num_entries()

EntryIndex num_entries ( ) const
inline

Definition at line 340 of file sparse.h.

◆ num_rows()

RowIndex num_rows ( ) const
inline

Definition at line 344 of file sparse.h.

◆ PopulateFromMatrixView()

void PopulateFromMatrixView ( const MatrixView input)

Definition at line 437 of file sparse.cc.

◆ PopulateFromTranspose()

void PopulateFromTranspose ( const CompactSparseMatrix input)

Definition at line 456 of file sparse.cc.

◆ Reset()

void Reset ( RowIndex  num_rows)

Definition at line 515 of file sparse.cc.

◆ Swap()

void Swap ( CompactSparseMatrix other)

Definition at line 585 of file sparse.cc.

Member Data Documentation

◆ coefficients_

StrictITIVector<EntryIndex, Fractional> coefficients_
protected

Definition at line 459 of file sparse.h.

◆ num_cols_

ColIndex num_cols_
protected

Definition at line 454 of file sparse.h.

◆ num_rows_

RowIndex num_rows_
protected

Definition at line 453 of file sparse.h.

◆ rows_

StrictITIVector<EntryIndex, RowIndex> rows_
protected

Definition at line 460 of file sparse.h.

◆ starts_

StrictITIVector<ColIndex, EntryIndex> starts_
protected

Definition at line 461 of file sparse.h.


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