Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <markowitz.h>
Public Member Functions | |
ColumnPriorityQueue ()=default | |
ColumnPriorityQueue (const ColumnPriorityQueue &)=delete | |
This type is neither copyable nor movable. | |
ColumnPriorityQueue & | operator= (const ColumnPriorityQueue &)=delete |
void | Clear () |
Releases the memory used by this class. | |
void | Reset (int32_t max_degree, ColIndex num_cols) |
void | PushOrAdjust (ColIndex col, int32_t degree) |
ColIndex | Pop () |
Adjustable priority queue of columns. Pop() returns a column with the smallest degree first (degree = number of entries in the column). Empty columns (i.e. with degree 0) are not stored in the queue.
Definition at line 210 of file markowitz.h.
|
default |
|
delete |
This type is neither copyable nor movable.
void operations_research::glop::ColumnPriorityQueue::Clear | ( | ) |
Releases the memory used by this class.
Definition at line 813 of file markowitz.cc.
|
delete |
ColIndex operations_research::glop::ColumnPriorityQueue::Pop | ( | ) |
Removes the column index with higher priority from the queue and returns it. Returns kInvalidCol if the queue is empty.
Definition at line 853 of file markowitz.cc.
void operations_research::glop::ColumnPriorityQueue::PushOrAdjust | ( | ColIndex | col, |
int32_t | degree ) |
Changes the degree of a column and make sure it is in the queue. The degree must be non-negative (>= 0) and at most equal to the value of num_cols used in Reset(). A degree of zero will remove the column from the queue.
Definition at line 827 of file markowitz.cc.
void operations_research::glop::ColumnPriorityQueue::Reset | ( | int32_t | max_degree, |
ColIndex | num_cols ) |
Clears the queue and prepares it to store up to num_cols column indices with a degree from 1 to max_degree included.
Definition at line 819 of file markowitz.cc.