|
reconciliation_lib 0.1
Library for data reconciliation algorithms
|
Non-owning view into a contiguous slice of a vector or matrix row/column.
More...
#include <gsl_wrapper.h>
Public Member Functions | |
| vector_view (const vector_view &src) | |
| Copy constructor (shallow — both views reference the same data). | |
| int | size () const |
| Return the number of elements. | |
| double | get (int i) const |
Return element i. | |
| void | set (int i, double val) |
Set element i to val (modifies the underlying data). | |
| const gsl_vector * | gsl_internal () const |
Return a read-only pointer to the underlying gsl_vector. | |
| vector_view & | operator= (const vector &src) |
Copy values from src into the viewed memory. | |
| vector_view & | operator= (const vector_view &src) |
| Copy values from another view into the viewed memory. | |
| operator vector () const | |
Create an independent vector copy of this view. | |
Private Member Functions | |
| vector_view (const gsl_vector_view &vv) | |
Private Attributes | |
| gsl_vector_view | vv |
Friends | |
| class | vector |
| class | matrix |
Non-owning view into a contiguous slice of a vector or matrix row/column.
Wraps a gsl_vector_view. The referenced data is owned by the original vector or matrix — the view must not outlive it. Assigning to a view modifies the underlying data in place. Use operator vector() to obtain an independent copy.
|
private |
| dvrlib::vector_view::vector_view | ( | const vector_view & | src | ) |
Copy constructor (shallow — both views reference the same data).
| const gsl_vector * dvrlib::vector_view::gsl_internal | ( | ) | const |
Return a read-only pointer to the underlying gsl_vector.
| dvrlib::vector_view::operator vector | ( | ) | const |
Create an independent vector copy of this view.
| vector_view & dvrlib::vector_view::operator= | ( | const vector & | src | ) |
Copy values from src into the viewed memory.
| vector_view & dvrlib::vector_view::operator= | ( | const vector_view & | src | ) |
Copy values from another view into the viewed memory.
Set element i to val (modifies the underlying data).
| int dvrlib::vector_view::size | ( | ) | const |
Return the number of elements.
|
private |