Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <markowitz.h>
Public Member Functions | |
SparseMatrixWithReusableColumnMemory ()=default | |
SparseMatrixWithReusableColumnMemory (const SparseMatrixWithReusableColumnMemory &)=delete | |
This type is neither copyable nor movable. | |
SparseMatrixWithReusableColumnMemory & | operator= (const SparseMatrixWithReusableColumnMemory &)=delete |
void | Reset (ColIndex num_cols) |
Resets the repository to num_cols empty columns. | |
const SparseColumn & | column (ColIndex col) const |
Returns the column with given index. | |
SparseColumn * | mutable_column (ColIndex col) |
void | ClearAndReleaseColumn (ColIndex col) |
void | Clear () |
Contains a set of columns indexed by ColIndex. This is like a SparseMatrix but this class is optimized for the case where only a small subset of columns is needed at the same time (like it is the case in our LU algorithm). It reuses the memory of the columns that are no longer needed.
Definition at line 245 of file markowitz.h.
|
default |
|
delete |
This type is neither copyable nor movable.
void operations_research::glop::SparseMatrixWithReusableColumnMemory::Clear | ( | ) |
Reverts this class to its initial state. This releases the memory of the columns that were used but not the memory of this class member (this should be fine).
Definition at line 902 of file markowitz.cc.
void operations_research::glop::SparseMatrixWithReusableColumnMemory::ClearAndReleaseColumn | ( | ColIndex | col | ) |
Clears the column with given index and releases its memory to the common memory pool that is used to create new mutable_column() on demand.
Definition at line 895 of file markowitz.cc.
const SparseColumn & operations_research::glop::SparseMatrixWithReusableColumnMemory::column | ( | ColIndex | col | ) | const |
Returns the column with given index.
Definition at line 874 of file markowitz.cc.
SparseColumn * operations_research::glop::SparseMatrixWithReusableColumnMemory::mutable_column | ( | ColIndex | col | ) |
Gets the mutable column with given column index. The returned vector address is only valid until the next call to mutable_column().
Definition at line 880 of file markowitz.cc.
|
delete |
void operations_research::glop::SparseMatrixWithReusableColumnMemory::Reset | ( | ColIndex | num_cols | ) |
Resets the repository to num_cols empty columns.
Definition at line 868 of file markowitz.cc.