1 #ifndef _theplu_yat_utility_matrix_
2 #define _theplu_yat_utility_matrix_
29 #include "Exception.h"
30 #include "StrideIterator.h"
32 #include "VectorConstView.h"
33 #include "VectorView.h"
35 #include <gsl/gsl_matrix.h>
133 Matrix(
const size_t& r,
const size_t& c,
double init_value=0);
173 explicit Matrix(std::istream &,
char sep=
'\0')
174 throw(utility::
IO_error, std::exception);
184 void all(const
double value);
293 bool equal(const
Matrix&, const
double precision=0) const;
312 void mul(const Matrix& b);
324 void resize(
size_t r,
size_t c,
double init_value=0);
329 size_t rows(
void) const;
363 void swap_rows(const
size_t i, const
size_t j);
385 double& operator()(
size_t row,
size_t column);
397 const
double& operator()(
size_t row,
size_t column) const;
410 bool operator==(const Matrix& other) const;
423 bool operator!=(const Matrix& other) const;
433 const Matrix& operator=(const Matrix& other);
446 const Matrix& operator+=(const Matrix& b);
454 const Matrix& operator+=(const
double d);
467 const Matrix& operator-=(const Matrix&);
475 const Matrix& operator-=(const
double d);
486 const Matrix& operator*=(const Matrix&);
496 const Matrix& operator*=(
double d);
511 gsl_matrix* create_gsl_matrix_copy(
void) const;
518 void delete_allocated_memory(
void);
524 gsl_matrix* blas_result_;
536 bool isnull(const Matrix&);
545 double max(const Matrix&);
554 double min(const Matrix&);
567 std::pair<
size_t,
size_t>&
min,
568 std::pair<
size_t,
size_t>&
max);
585 bool nan(const Matrix& templat, Matrix& flag);
596 void swap(Matrix&, Matrix&);
603 std::ostream& operator<< (std::ostream& s, const Matrix&);
619 Vector operator*(const VectorBase&, const Matrix&);
630 double trace(const Matrix&);