Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::SparseMatrixWithReusableColumnMemory Class Reference

#include <markowitz.h>

Public Member Functions

 SparseMatrixWithReusableColumnMemory ()=default
 
 SparseMatrixWithReusableColumnMemory (const SparseMatrixWithReusableColumnMemory &)=delete
 This type is neither copyable nor movable.
 
SparseMatrixWithReusableColumnMemoryoperator= (const SparseMatrixWithReusableColumnMemory &)=delete
 
void Reset (ColIndex num_cols)
 Resets the repository to num_cols empty columns.
 
const SparseColumncolumn (ColIndex col) const
 Returns the column with given index.
 
SparseColumnmutable_column (ColIndex col)
 
void ClearAndReleaseColumn (ColIndex col)
 
void Clear ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SparseMatrixWithReusableColumnMemory() [1/2]

operations_research::glop::SparseMatrixWithReusableColumnMemory::SparseMatrixWithReusableColumnMemory ( )
default

◆ SparseMatrixWithReusableColumnMemory() [2/2]

operations_research::glop::SparseMatrixWithReusableColumnMemory::SparseMatrixWithReusableColumnMemory ( const SparseMatrixWithReusableColumnMemory & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ Clear()

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.

◆ ClearAndReleaseColumn()

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.

◆ column()

const SparseColumn & operations_research::glop::SparseMatrixWithReusableColumnMemory::column ( ColIndex col) const

Returns the column with given index.

Definition at line 874 of file markowitz.cc.

◆ mutable_column()

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.

◆ operator=()

SparseMatrixWithReusableColumnMemory & operations_research::glop::SparseMatrixWithReusableColumnMemory::operator= ( const SparseMatrixWithReusableColumnMemory & )
delete

◆ Reset()

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.


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