Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::SparseMatrix< RowId, ColumnId > Class Template Reference

Detailed Description

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

Definition at line 175 of file sparse_matrix.h.

#include <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()

template<typename RowId, typename ColumnId>
void operations_research::math_opt::SparseMatrix< RowId, ColumnId >::Clear ( )

Definition at line 505 of file sparse_matrix.h.

◆ column()

template<typename RowId, typename ColumnId>
std::vector< RowId > operations_research::math_opt::SparseMatrix< RowId, ColumnId >::column ( ColumnId column_id) const

Definition at line 445 of file sparse_matrix.h.

◆ ColumnTerms()

template<typename RowId, typename ColumnId>
std::vector< std::pair< RowId, double > > operations_research::math_opt::SparseMatrix< RowId, ColumnId >::ColumnTerms ( ColumnId col_id) const

Definition at line 477 of file sparse_matrix.h.

◆ contains()

template<typename RowId, typename ColumnId>
bool operations_research::math_opt::SparseMatrix< RowId, ColumnId >::contains ( RowId row,
ColumnId column ) const

Definition at line 391 of file sparse_matrix.h.

◆ DeleteColumn()

template<typename RowId, typename ColumnId>
void operations_research::math_opt::SparseMatrix< RowId, ColumnId >::DeleteColumn ( ColumnId column)

Definition at line 414 of file sparse_matrix.h.

◆ DeleteRow()

template<typename RowId, typename ColumnId>
void operations_research::math_opt::SparseMatrix< RowId, ColumnId >::DeleteRow ( RowId row)

Definition at line 398 of file sparse_matrix.h.

◆ get()

template<typename RowId, typename ColumnId>
double operations_research::math_opt::SparseMatrix< RowId, ColumnId >::get ( RowId row,
ColumnId column ) const

Definition at line 382 of file sparse_matrix.h.

◆ impl_detail_matrix_storage_size()

template<typename RowId, typename ColumnId>
int64_t operations_research::math_opt::SparseMatrix< RowId, ColumnId >::impl_detail_matrix_storage_size ( ) const
inline

Definition at line 230 of file sparse_matrix.h.

◆ nonzeros()

template<typename RowId, typename ColumnId>
int64_t operations_research::math_opt::SparseMatrix< RowId, ColumnId >::nonzeros ( ) const

Definition at line 512 of file sparse_matrix.h.

◆ Proto()

template<typename RowId, typename ColumnId>
SparseDoubleMatrixProto operations_research::math_opt::SparseMatrix< RowId, ColumnId >::Proto ( ) const

Definition at line 517 of file sparse_matrix.h.

◆ row()

template<typename RowId, typename ColumnId>
std::vector< ColumnId > operations_research::math_opt::SparseMatrix< RowId, ColumnId >::row ( RowId row_id) const

Definition at line 430 of file sparse_matrix.h.

◆ RowTerms()

template<typename RowId, typename ColumnId>
std::vector< std::pair< ColumnId, double > > operations_research::math_opt::SparseMatrix< RowId, ColumnId >::RowTerms ( RowId row_id) const

Definition at line 461 of file sparse_matrix.h.

◆ set()

template<typename RowId, typename ColumnId>
bool operations_research::math_opt::SparseMatrix< RowId, ColumnId >::set ( RowId row,
ColumnId column,
double value )

Definition at line 352 of file sparse_matrix.h.

◆ Terms()

template<typename RowId, typename ColumnId>
std::vector< std::tuple< RowId, ColumnId, double > > operations_research::math_opt::SparseMatrix< RowId, ColumnId >::Terms ( ) const

Definition at line 493 of file sparse_matrix.h.

◆ Update()

template<typename RowId, typename ColumnId>
SparseDoubleMatrixProto operations_research::math_opt::SparseMatrix< RowId, ColumnId >::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 530 of file sparse_matrix.h.


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