ReFRACtor
|
This provides thin wrapper around the GNU Scientific Library gsl_vector. More...
#include <fp_gsl_matrix.h>
Public Member Functions | |
GslVector () | |
Default constructor. More... | |
GslVector (gsl_vector *M, bool Owned=true) | |
Use data owned by gsl_vector. More... | |
GslVector (blitz::Array< double, 1 > &M) | |
Use data owned by blitz::Array. More... | |
~GslVector () | |
Destructor. More... | |
const blitz::Array< double, 1 > & | blitz_array () const |
Return blitz::Array look at data. More... | |
blitz::Array< double, 1 > & | blitz_array () |
Return blitz::Array look at data. More... | |
const gsl_vector * | gsl () const |
Return gsl_vector look at data. More... | |
gsl_vector * | gsl () |
Return gsl_vector look at data. More... | |
void | reset (gsl_vector *M, bool Owned=true) |
Reset class to point to new vector. More... | |
void | reset (blitz::Array< double, 1 > &M) |
Reset to use data owned by blitz::Array. More... | |
Public Attributes | |
blitz::Array< double, 1 > | blitz_array_ |
bool | block_owned_ |
gsl_vector * | gsl_vector_ |
bool | owned_ |
This provides thin wrapper around the GNU Scientific Library gsl_vector.
The GSL is a pretty complete scientific library. However, is C based and out of the box doesn't place nicely with other C++ classes (such as blitz::Array). We provide some thin wrapper code around the GSL code to interface these two classes. This provides both a blitz::Array and a gsl_vector view of the same underlying data.
Definition at line 96 of file fp_gsl_matrix.h.
|
inline |
Default constructor.
Definition at line 102 of file fp_gsl_matrix.h.
|
inline |
Use data owned by gsl_vector.
This data can either have ownership passed to this class (in which case we delete it when done with it), or just a reference (in which case the lifetime is handled outside of this class).
Definition at line 111 of file fp_gsl_matrix.h.
|
inline |
Use data owned by blitz::Array.
Note that if this data isStorageContiguous(), and in C order then we use the data in place. If it isn't be make a contiguous copy of it. This means that in one case the original vector will be modified if the gsl_vector view of the data is modified, and the second case it won't. If you don't want this behaviour, you can form a copy before you pass it to this constructor.
Definition at line 125 of file fp_gsl_matrix.h.
GslVector::~GslVector | ( | ) |
Destructor.
Definition at line 125 of file fp_gsl_matrix.cc.
|
inline |
Return blitz::Array look at data.
Definition at line 147 of file fp_gsl_matrix.h.
|
inline |
Return blitz::Array look at data.
Definition at line 153 of file fp_gsl_matrix.h.
|
inline |
Return gsl_vector look at data.
Definition at line 135 of file fp_gsl_matrix.h.
|
inline |
Return gsl_vector look at data.
Definition at line 141 of file fp_gsl_matrix.h.
void GslVector::reset | ( | gsl_vector * | M, |
bool | Owned = true |
||
) |
Reset class to point to new vector.
This data can either have ownership passed to this class (in which case we delete it when done with it), or just a reference (in which case the lifetime is handled outside of this class).
Definition at line 78 of file fp_gsl_matrix.cc.
void GslVector::reset | ( | blitz::Array< double, 1 > & | M | ) |
Reset to use data owned by blitz::Array.
Note that if this data isStorageContiguous(), then we use the data in place. If it isn't be make a contiguous copy of it. This means that in one case the original vector will be modified if the gsl_vector view of the data is modified, and the second case it won't. If you don't want this behaviour, you can form a copy before you pass it to this constructor.
Definition at line 102 of file fp_gsl_matrix.cc.
blitz::Array<double, 1> FullPhysics::GslVector::blitz_array_ |
Definition at line 155 of file fp_gsl_matrix.h.
bool FullPhysics::GslVector::block_owned_ |
Definition at line 159 of file fp_gsl_matrix.h.
gsl_vector* FullPhysics::GslVector::gsl_vector_ |
Definition at line 156 of file fp_gsl_matrix.h.
bool FullPhysics::GslVector::owned_ |
Definition at line 157 of file fp_gsl_matrix.h.