OR-Tools  9.6
CompactSparseMatrix

Detailed Description

Definition at line 291 of file sparse.h.

Classes

class  ConstView
 

Public Member Functions

 CompactSparseMatrix ()
 
ConstView view () const
 
 CompactSparseMatrix (const SparseMatrix &matrix)
 
void PopulateFromMatrixView (const MatrixView &input)
 
void PopulateFromSparseMatrixAndAddSlacks (const SparseMatrix &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
 
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 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/2]

CompactSparseMatrix ( )
inline

Definition at line 333 of file sparse.h.

◆ CompactSparseMatrix() [2/2]

CompactSparseMatrix ( const SparseMatrix matrix)
inlineexplicit

Definition at line 338 of file sparse.h.

Member Function Documentation

◆ AddAndClearColumnWithNonZeros()

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

Definition at line 607 of file sparse.cc.

◆ AddDenseColumn()

ColIndex AddDenseColumn ( const DenseColumn dense_column)

Definition at line 574 of file sparse.cc.

◆ AddDenseColumnPrefix()

ColIndex AddDenseColumnPrefix ( const DenseColumn dense_column,
RowIndex  start 
)

Definition at line 578 of file sparse.cc.

◆ AddDenseColumnWithNonZeros()

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

Definition at line 592 of file sparse.cc.

◆ column()

ColumnView column ( ColIndex  col) const
inline

Definition at line 403 of file sparse.h.

◆ Column()

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

Definition at line 495 of file sparse.h.

◆ ColumnAddMultipleToDenseColumn()

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

Definition at line 428 of file sparse.h.

◆ ColumnAddMultipleToSparseScatteredColumn()

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

Definition at line 442 of file sparse.h.

◆ ColumnCopyToClearedDenseColumn()

void ColumnCopyToClearedDenseColumn ( ColIndex  col,
DenseColumn dense_column 
) const
inline

Definition at line 464 of file sparse.h.

◆ ColumnCopyToClearedDenseColumnWithNonZeros()

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

Definition at line 476 of file sparse.h.

◆ ColumnCopyToDenseColumn()

void ColumnCopyToDenseColumn ( ColIndex  col,
DenseColumn dense_column 
) const
inline

Definition at line 456 of file sparse.h.

◆ ColumnIsEmpty()

bool ColumnIsEmpty ( ColIndex  col) const
inline

Definition at line 415 of file sparse.h.

◆ ColumnNumEntries()

EntryIndex ColumnNumEntries ( ColIndex  col) const
inline

Definition at line 383 of file sparse.h.

◆ ColumnScalarProduct()

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

Definition at line 421 of file sparse.h.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Definition at line 396 of file sparse.h.

◆ num_cols()

ColIndex num_cols ( ) const
inline

Definition at line 393 of file sparse.h.

◆ num_entries()

EntryIndex num_entries ( ) const
inline

Definition at line 388 of file sparse.h.

◆ num_rows()

RowIndex num_rows ( ) const
inline

Definition at line 392 of file sparse.h.

◆ PopulateFromMatrixView()

void PopulateFromMatrixView ( const MatrixView input)

Definition at line 442 of file sparse.cc.

◆ PopulateFromSparseMatrixAndAddSlacks()

void PopulateFromSparseMatrixAndAddSlacks ( const SparseMatrix input)

Definition at line 461 of file sparse.cc.

◆ PopulateFromTranspose()

void PopulateFromTranspose ( const CompactSparseMatrix input)

Definition at line 488 of file sparse.cc.

◆ Reset()

void Reset ( RowIndex  num_rows)

Definition at line 553 of file sparse.cc.

◆ Swap()

void Swap ( CompactSparseMatrix other)

Definition at line 623 of file sparse.cc.

◆ view()

ConstView view ( ) const
inline

Definition at line 334 of file sparse.h.

Member Data Documentation

◆ coefficients_

StrictITIVector<EntryIndex, Fractional> coefficients_
protected

Definition at line 506 of file sparse.h.

◆ num_cols_

ColIndex num_cols_
protected

Definition at line 501 of file sparse.h.

◆ num_rows_

RowIndex num_rows_
protected

Definition at line 500 of file sparse.h.

◆ rows_

StrictITIVector<EntryIndex, RowIndex> rows_
protected

Definition at line 507 of file sparse.h.

◆ starts_

StrictITIVector<ColIndex, EntryIndex> starts_
protected

Definition at line 508 of file sparse.h.


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