SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
smtrat::fmplex::Matrix Class Reference

#include <Matrix.h>

Collaboration diagram for smtrat::fmplex::Matrix:

Data Structures

struct  col_iterator
 
struct  col_view
 
struct  ColEntry
 
struct  row_iterator
 
struct  row_view
 
struct  RowEntry
 

Public Types

using RowIndex = std::size_t
 
using ColIndex = std::size_t
 
using DataIndex = std::size_t
 
using Column = std::vector< ColEntry >
 

Public Member Functions

 Matrix ()
 
 Matrix (const Matrix &other)=default
 
 Matrix (Matrix &&other)=default
 
 Matrix (std::size_t expected_rows, std::size_t expected_cols)
 
 ~Matrix ()=default
 
Matrixoperator= (const Matrix &other)=default
 
void reserve (std::size_t n)
 
std::size_t n_rows () const
 
std::size_t n_cols () const
 
std::size_t non_zeros_in_col (const ColIndex ci) const
 
std::size_t non_zeros_in_row (const RowIndex ri) const
 
std::size_t non_zeros_total () const
 
Rational coeff (const RowIndex i, const ColIndex j) const
 
template<typename It >
RowIndex append_row (const It &begin, const It &end)
 Appends the row contained in the range between begin and end to the matrix. More...
 
std::vector< RowEntrycombine (const RowIndex row_idx_1, const Rational &scale_1, const RowIndex row_idx_2, const Rational &scale_2) const
 Computes scale_1*A_(i,-) + scale_2*A_(j,-) where i=row_idx_1, j=row_idx_2. More...
 
row_iterator row_begin (RowIndex r) const
 
row_iterator row_end (RowIndex r) const
 
row_view row_entries (const RowIndex ri) const
 
col_iterator col_begin (ColIndex c) const
 
col_iterator col_end (ColIndex c) const
 
col_view col_entries (const ColIndex ci) const
 

Private Member Functions

DataIndex row_start_idx (const RowIndex ri) const
 
DataIndex row_end_idx (const RowIndex ri) const
 
std::size_t row_size (const RowIndex ri) const
 

Private Attributes

std::vector< RowEntrym_data
 
std::vector< DataIndexm_row_starts
 
std::vector< Columnm_cols
 

Detailed Description

Definition at line 9 of file Matrix.h.

Member Typedef Documentation

◆ ColIndex

using smtrat::fmplex::Matrix::ColIndex = std::size_t

Definition at line 14 of file Matrix.h.

◆ Column

Definition at line 29 of file Matrix.h.

◆ DataIndex

using smtrat::fmplex::Matrix::DataIndex = std::size_t

Definition at line 15 of file Matrix.h.

◆ RowIndex

using smtrat::fmplex::Matrix::RowIndex = std::size_t

Definition at line 13 of file Matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/4]

smtrat::fmplex::Matrix::Matrix ( )
inline

Definition at line 54 of file Matrix.h.

◆ Matrix() [2/4]

smtrat::fmplex::Matrix::Matrix ( const Matrix other)
default

◆ Matrix() [3/4]

smtrat::fmplex::Matrix::Matrix ( Matrix &&  other)
default

◆ Matrix() [4/4]

smtrat::fmplex::Matrix::Matrix ( std::size_t  expected_rows,
std::size_t  expected_cols 
)
inline

Definition at line 59 of file Matrix.h.

◆ ~Matrix()

smtrat::fmplex::Matrix::~Matrix ( )
default

Member Function Documentation

◆ append_row()

template<typename It >
RowIndex smtrat::fmplex::Matrix::append_row ( const It &  begin,
const It &  end 
)
inline

Appends the row contained in the range between begin and end to the matrix.

This assumes the inputs to be of the same iterator-like type pointing to RowEntry's.

Returns
the row index of the appended row within the matrix.

Definition at line 91 of file Matrix.h.

Here is the caller graph for this function:

◆ coeff()

Rational smtrat::fmplex::Matrix::coeff ( const RowIndex  i,
const ColIndex  j 
) const
inline

Definition at line 76 of file Matrix.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ col_begin()

col_iterator smtrat::fmplex::Matrix::col_begin ( ColIndex  c) const
inline

Definition at line 194 of file Matrix.h.

Here is the caller graph for this function:

◆ col_end()

col_iterator smtrat::fmplex::Matrix::col_end ( ColIndex  c) const
inline

Definition at line 195 of file Matrix.h.

Here is the caller graph for this function:

◆ col_entries()

col_view smtrat::fmplex::Matrix::col_entries ( const ColIndex  ci) const
inline

Definition at line 208 of file Matrix.h.

Here is the caller graph for this function:

◆ combine()

std::vector<RowEntry> smtrat::fmplex::Matrix::combine ( const RowIndex  row_idx_1,
const Rational scale_1,
const RowIndex  row_idx_2,
const Rational scale_2 
) const
inline

Computes scale_1*A_(i,-) + scale_2*A_(j,-) where i=row_idx_1, j=row_idx_2.

Returns
a vector containing the elements of the computed row.

Definition at line 106 of file Matrix.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ n_cols()

std::size_t smtrat::fmplex::Matrix::n_cols ( ) const
inline

Definition at line 70 of file Matrix.h.

Here is the caller graph for this function:

◆ n_rows()

std::size_t smtrat::fmplex::Matrix::n_rows ( ) const
inline

Definition at line 69 of file Matrix.h.

Here is the caller graph for this function:

◆ non_zeros_in_col()

std::size_t smtrat::fmplex::Matrix::non_zeros_in_col ( const ColIndex  ci) const
inline

Definition at line 72 of file Matrix.h.

◆ non_zeros_in_row()

std::size_t smtrat::fmplex::Matrix::non_zeros_in_row ( const RowIndex  ri) const
inline

Definition at line 73 of file Matrix.h.

Here is the call graph for this function:

◆ non_zeros_total()

std::size_t smtrat::fmplex::Matrix::non_zeros_total ( ) const
inline

Definition at line 74 of file Matrix.h.

Here is the caller graph for this function:

◆ operator=()

Matrix& smtrat::fmplex::Matrix::operator= ( const Matrix other)
default

◆ reserve()

void smtrat::fmplex::Matrix::reserve ( std::size_t  n)
inline

Definition at line 67 of file Matrix.h.

Here is the caller graph for this function:

◆ row_begin()

row_iterator smtrat::fmplex::Matrix::row_begin ( RowIndex  r) const
inline

Definition at line 160 of file Matrix.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ row_end()

row_iterator smtrat::fmplex::Matrix::row_end ( RowIndex  r) const
inline

Definition at line 161 of file Matrix.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ row_end_idx()

DataIndex smtrat::fmplex::Matrix::row_end_idx ( const RowIndex  ri) const
inlineprivate

Definition at line 44 of file Matrix.h.

Here is the caller graph for this function:

◆ row_entries()

row_view smtrat::fmplex::Matrix::row_entries ( const RowIndex  ri) const
inline

Definition at line 173 of file Matrix.h.

Here is the caller graph for this function:

◆ row_size()

std::size_t smtrat::fmplex::Matrix::row_size ( const RowIndex  ri) const
inlineprivate

Definition at line 48 of file Matrix.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ row_start_idx()

DataIndex smtrat::fmplex::Matrix::row_start_idx ( const RowIndex  ri) const
inlineprivate

Definition at line 39 of file Matrix.h.

Here is the caller graph for this function:

Field Documentation

◆ m_cols

std::vector<Column> smtrat::fmplex::Matrix::m_cols
private

Definition at line 35 of file Matrix.h.

◆ m_data

std::vector<RowEntry> smtrat::fmplex::Matrix::m_data
private

Definition at line 33 of file Matrix.h.

◆ m_row_starts

std::vector<DataIndex> smtrat::fmplex::Matrix::m_row_starts
private

Definition at line 34 of file Matrix.h.


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