OR-Tools  9.6
SparseMatrix< RowId, ColumnId >

Detailed Description

template<typename RowId, typename ColumnId>
class operations_research::math_opt::SparseMatrix< RowId, ColumnId >

Definition at line 175 of file sparse_matrix.h.

Public Member Functions

bool set (RowId row, ColumnId column, double value)
 
double get (RowId row, ColumnId column) const
 
bool contains (RowId row, ColumnId column) const
 
void DeleteRow (RowId row)
 
void DeleteColumn (ColumnId column)
 
std::vector< ColumnId > row (RowId row_id) const
 
std::vector< RowId > column (ColumnId column_id) const
 
std::vector< std::pair< ColumnId, double > > RowTerms (RowId row_id) const
 
std::vector< std::pair< RowId, double > > ColumnTerms (ColumnId col_id) const
 
std::vector< std::tuple< RowId, ColumnId, double > > Terms () const
 
void Clear ()
 
int64_t nonzeros () const
 
int64_t impl_detail_matrix_storage_size () const
 
SparseDoubleMatrixProto Proto () const
 
SparseDoubleMatrixProto Update (const absl::flat_hash_set< RowId > &deleted_rows, absl::Span< const RowId > new_rows, const absl::flat_hash_set< ColumnId > &deleted_columns, absl::Span< const ColumnId > new_columns, const absl::flat_hash_set< std::pair< RowId, ColumnId >> &dirty) const
 

Member Function Documentation

◆ Clear()

void Clear

Definition at line 497 of file sparse_matrix.h.

◆ column()

std::vector< RowId > column ( ColumnId  column_id) const

Definition at line 437 of file sparse_matrix.h.

◆ ColumnTerms()

std::vector< std::pair< RowId, double > > ColumnTerms ( ColumnId  col_id) const

Definition at line 469 of file sparse_matrix.h.

◆ contains()

bool contains ( RowId  row,
ColumnId  column 
) const

Definition at line 383 of file sparse_matrix.h.

◆ DeleteColumn()

void DeleteColumn ( ColumnId  column)

Definition at line 406 of file sparse_matrix.h.

◆ DeleteRow()

void DeleteRow ( RowId  row)

Definition at line 390 of file sparse_matrix.h.

◆ get()

double get ( RowId  row,
ColumnId  column 
) const

Definition at line 374 of file sparse_matrix.h.

◆ impl_detail_matrix_storage_size()

int64_t impl_detail_matrix_storage_size ( ) const
inline

Definition at line 230 of file sparse_matrix.h.

◆ nonzeros()

int64_t nonzeros

Definition at line 504 of file sparse_matrix.h.

◆ Proto()

SparseDoubleMatrixProto Proto

Definition at line 509 of file sparse_matrix.h.

◆ row()

std::vector< ColumnId > row ( RowId  row_id) const

Definition at line 422 of file sparse_matrix.h.

◆ RowTerms()

std::vector< std::pair< ColumnId, double > > RowTerms ( RowId  row_id) const

Definition at line 453 of file sparse_matrix.h.

◆ set()

bool set ( RowId  row,
ColumnId  column,
double  value 
)

Definition at line 344 of file sparse_matrix.h.

◆ Terms()

std::vector< std::tuple< RowId, ColumnId, double > > Terms

Definition at line 485 of file sparse_matrix.h.

◆ Update()

SparseDoubleMatrixProto Update ( const absl::flat_hash_set< RowId > &  deleted_rows,
absl::Span< const RowId >  new_rows,
const absl::flat_hash_set< ColumnId > &  deleted_columns,
absl::Span< const ColumnId >  new_columns,
const absl::flat_hash_set< std::pair< RowId, ColumnId >> &  dirty 
) const

Definition at line 522 of file sparse_matrix.h.


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