1 #ifndef _theplu_yat_utility_basic_matrix 2 #define _theplu_yat_utility_basic_matrix 25 #include <gsl/gsl_matrix.h> 37 template<
class Derived>
50 {
return (*static_cast<const Derived*>(
this))(row, column); }
56 {
return static_cast<const Derived*
>(
this)->
gsl_matrix_p(); }
62 {
return static_cast<const Derived*
>(
this)->
rows(); }
68 {
return static_cast<const Derived*
>(
this)->
columns();}
83 gsl_matrix* allocate_matrix(
size_t row,
size_t col);
87 void assign(gsl_matrix* dest,
const gsl_matrix* src);
90 size_t columns(
const gsl_matrix* p);
94 void copy(gsl_matrix*& dest,
const gsl_matrix* src);
97 const double* end(
const gsl_matrix* p);
101 void move_if_owner(gsl_matrix*& dest, gsl_matrix*& src);
104 gsl_matrix* create_copy(
const gsl_matrix* p);
107 void deallocate(gsl_matrix*& p);
113 void reallocate(gsl_matrix*& p,
size_t row,
size_t col);
116 size_t rows(
const gsl_matrix* p);
121 bool overlap(
const gsl_matrix* lhs,
const gsl_matrix* rhs);
The Department of Theoretical Physics namespace as we define it.
Derived derived_type
Definition: BasicMatrix.h:44
size_t columns(void) const
Definition: BasicMatrix.h:67
size_t rows(void) const
Definition: BasicMatrix.h:61
double operator()(size_t row, size_t column) const
Definition: BasicMatrix.h:49
Definition: BasicMatrix.h:38
const gsl_matrix * gsl_matrix_p(void) const
Definition: BasicMatrix.h:55
bool overlap(const yat::utility::Segment< T, Compare > &lhs, const yat::utility::Segment< T, Compare > &rhs)
Definition: Segment.h:322