1 #ifndef _theplu_yat_utility_matrix_expression 2 #define _theplu_yat_utility_matrix_expression 25 #include "BasicMatrix.h" 26 #include "yat_assert.h" 28 #include <gsl/gsl_matrix.h> 45 template<
class Derived>
65 detail::deallocate(
m_);
73 detail::copy(
m_, other.
m_);
76 #ifdef YAT_HAVE_RVALUE 81 std::swap(
m_, other.m_);
89 {
return static_cast<const Derived*
>(
this)->
rows(); }
96 {
return static_cast<const Derived*
>(
this)->
columns();}
103 {
return (*static_cast<const Derived*>(
this))(row, column); }
112 void get(gsl_matrix*& m)
const 114 static_cast<const Derived*
>(
this)->calculate_matrix(m);
164 mutable gsl_matrix*
m_;
size_t rows(void) const
Definition: MatrixExpression.h:88
The Department of Theoretical Physics namespace as we define it.
MatrixExpression(const MatrixExpression &other)
Cop constructor.
Definition: MatrixExpression.h:70
double operator()(size_t row, size_t column) const
Definition: MatrixExpression.h:102
const gsl_matrix * gsl_matrix_p(void) const
Definition: MatrixExpression.h:140
size_t columns(void) const
Definition: MatrixExpression.h:95
gsl_matrix * gsl_matrix_p(void)
Definition: MatrixExpression.h:152
void move(gsl_matrix *&m)
Definition: MatrixExpression.h:123
An expression that can be converted to a Matrix.
Definition: MatrixExpression.h:46
~MatrixExpression(void)
Destructor.
Definition: MatrixExpression.h:63
MatrixExpression(void)
Defaulf constructor.
Definition: MatrixExpression.h:58
Definition: BasicMatrix.h:38
Derived derived_type
Definition: MatrixExpression.h:53
gsl_matrix * m_
Definition: MatrixExpression.h:164