reconciliation_lib 0.1
Library for data reconciliation algorithms
Loading...
Searching...
No Matches
dvrlib::matrix_view Class Reference

Non-owning view into a rectangular sub-region of a matrix. More...

#include <gsl_wrapper.h>

Public Member Functions

 matrix_view (const matrix_view &src)
 Copy constructor (shallow — both views reference the same data).
 
int size1 () const
 Return the number of rows.
 
int size2 () const
 Return the number of columns.
 
double get (int i, int j) const
 Return element (i, j).
 
void set (int i, int j, double val)
 Set element (i, j) to val (modifies the underlying data).
 
const gsl_matrixgsl_internal () const
 Return a read-only pointer to the underlying gsl_matrix.
 
matrix_viewoperator= (const matrix &src)
 Copy values from src into the viewed memory.
 
matrix_viewoperator= (const matrix_view &src)
 Copy values from another view into the viewed memory.
 
 operator matrix () const
 Create an independent matrix copy of this view.
 

Private Member Functions

 matrix_view (const gsl_matrix_view &mv)
 

Private Attributes

gsl_matrix_view mv
 

Friends

class matrix
 

Detailed Description

Non-owning view into a rectangular sub-region of a matrix.

Wraps a gsl_matrix_view. The referenced data is owned by the original matrix — the view must not outlive it. Assigning to a view modifies the underlying data in place. Use operator matrix() to obtain an independent copy.

Constructor & Destructor Documentation

◆ matrix_view() [1/2]

dvrlib::matrix_view::matrix_view ( const gsl_matrix_view mv)
private

◆ matrix_view() [2/2]

dvrlib::matrix_view::matrix_view ( const matrix_view src)

Copy constructor (shallow — both views reference the same data).

Member Function Documentation

◆ get()

double dvrlib::matrix_view::get ( int  i,
int  j 
) const

Return element (i, j).

◆ gsl_internal()

const gsl_matrix * dvrlib::matrix_view::gsl_internal ( ) const

Return a read-only pointer to the underlying gsl_matrix.

◆ operator matrix()

dvrlib::matrix_view::operator matrix ( ) const

Create an independent matrix copy of this view.

◆ operator=() [1/2]

matrix_view & dvrlib::matrix_view::operator= ( const matrix src)

Copy values from src into the viewed memory.

◆ operator=() [2/2]

matrix_view & dvrlib::matrix_view::operator= ( const matrix_view src)

Copy values from another view into the viewed memory.

◆ set()

void dvrlib::matrix_view::set ( int  i,
int  j,
double  val 
)

Set element (i, j) to val (modifies the underlying data).

◆ size1()

int dvrlib::matrix_view::size1 ( ) const

Return the number of rows.

◆ size2()

int dvrlib::matrix_view::size2 ( ) const

Return the number of columns.

Friends And Related Symbol Documentation

◆ matrix

Member Data Documentation

◆ mv

gsl_matrix_view dvrlib::matrix_view::mv
private

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