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

Detailed Description

A matrix constructed from a list of already existing SparseColumn. This class does not take ownership of the underlying columns, and thus they must outlive this class (and keep the same address in memory).

Definition at line 229 of file sparse.h.

#include <sparse.h>

Public Member Functions

 MatrixView ()=default
 MatrixView (const SparseMatrix &matrix)
void PopulateFromMatrix (const SparseMatrix &matrix)
 Takes all the columns of the given matrix.
void PopulateFromMatrixPair (const SparseMatrix &matrix_a, const SparseMatrix &matrix_b)
void PopulateFromBasis (const MatrixView &matrix, const RowToColMapping &basis)
 Takes only the columns of the given matrix that belongs to the given basis.
bool IsEmpty () const
 Same behavior as the SparseMatrix functions above.
RowIndex num_rows () const
ColIndex num_cols () const
const SparseColumncolumn (ColIndex col) const
EntryIndex num_entries () const
Fractional ComputeOneNorm () const
Fractional ComputeInfinityNorm () const

Constructor & Destructor Documentation

◆ MatrixView() [1/2]

operations_research::glop::MatrixView::MatrixView ( )
default

◆ MatrixView() [2/2]

operations_research::glop::MatrixView::MatrixView ( const SparseMatrix & matrix)
inlineexplicit

Definition at line 232 of file sparse.h.

Member Function Documentation

◆ column()

const SparseColumn & operations_research::glop::MatrixView::column ( ColIndex col) const
inline

Definition at line 275 of file sparse.h.

◆ ComputeInfinityNorm()

Fractional operations_research::glop::MatrixView::ComputeInfinityNorm ( ) const

Definition at line 433 of file sparse.cc.

◆ ComputeOneNorm()

Fractional operations_research::glop::MatrixView::ComputeOneNorm ( ) const

Definition at line 430 of file sparse.cc.

◆ IsEmpty()

bool operations_research::glop::MatrixView::IsEmpty ( ) const
inline

Same behavior as the SparseMatrix functions above.

Definition at line 272 of file sparse.h.

◆ num_cols()

ColIndex operations_research::glop::MatrixView::num_cols ( ) const
inline

Definition at line 274 of file sparse.h.

◆ num_entries()

EntryIndex operations_research::glop::MatrixView::num_entries ( ) const

Definition at line 429 of file sparse.cc.

◆ num_rows()

RowIndex operations_research::glop::MatrixView::num_rows ( ) const
inline

Definition at line 273 of file sparse.h.

◆ PopulateFromBasis()

void operations_research::glop::MatrixView::PopulateFromBasis ( const MatrixView & matrix,
const RowToColMapping & basis )
inline

Takes only the columns of the given matrix that belongs to the given basis.

Definition at line 262 of file sparse.h.

◆ PopulateFromMatrix()

void operations_research::glop::MatrixView::PopulateFromMatrix ( const SparseMatrix & matrix)
inline

Takes all the columns of the given matrix.

Definition at line 237 of file sparse.h.

◆ PopulateFromMatrixPair()

void operations_research::glop::MatrixView::PopulateFromMatrixPair ( const SparseMatrix & matrix_a,
const SparseMatrix & matrix_b )
inline

Takes all the columns of the first matrix followed by the columns of the second matrix.

Definition at line 248 of file sparse.h.


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