27 #ifndef GMATRIXSYMMETRIC_HPP
28 #define GMATRIXSYMMETRIC_HPP
84 virtual const double&
operator()(
const int& row,
const int& column)
const;
104 virtual void clear(
void);
106 virtual std::string
classname(
void)
const;
107 virtual double&
at(
const int& row,
const int& column);
108 virtual const double&
at(
const int& row,
const int& column)
const;
110 virtual void row(
const int& row,
const GVector& vector);
112 virtual void column(
const int& column,
const GVector& vector);
115 virtual double fill(
void)
const;
116 virtual double min(
void)
const;
117 virtual double max(
void)
const;
118 virtual double sum(
void)
const;
154 return (
"GMatrixSymmetric");
double get_min_element(void) const
Return minimum matrix element.
GMatrix extract_lower_triangle(void) const
Extract lower triangle of matrix.
GMatrixSymmetric cholesky_invert(const bool &compress=true) const
Invert matrix using a Cholesky decomposition.
GArf operator/(const GArf &arf, const double &scale)
Auxiliary Response File vision operator friend.
void scale_elements(const double &scalar)
Scale all matrix elements with a scalar.
void free_members(void)
Delete class members.
Abstract matrix base class interface definition.
virtual ~GMatrixSymmetric(void)
Destructor.
GMatrixSymmetric(void)
Void constructor.
Sparse matrix class interface definition.
virtual void add_to_row(const int &row, const GVector &vector)
Add row to matrix elements.
virtual std::string classname(void) const
Return class name.
Symmetric matrix class interface definition.
virtual double & operator()(const int &row, const int &column)
Return reference to matrix element.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print matrix.
virtual void clear(void)
Clear matrix.
int m_num_inx
Number of indices in array.
GMatrixSymmetric invert(void) const
Return inverted matrix.
virtual GVector column(const int &column) const
Extract column as vector from matrix.
GVector cholesky_solver(const GVector &vector, const bool &compress=true) const
Cholesky solver.
virtual GMatrixSymmetric & operator-=(const GMatrixSymmetric &matrix)
Unary matrix subtraction operator.
virtual GMatrixSymmetric & operator+=(const GMatrixSymmetric &matrix)
Unary matrix addition operator.
virtual GMatrixSymmetric * clone(void) const
Clone matrix.
virtual GMatrixSymmetric & operator*=(const double &scaler)
Scale matrix elements.
Abstract matrix base class definition.
const int & rows(void) const
Return number of matrix rows.
virtual GMatrixSymmetric operator-(void) const
Negate matrix elements.
virtual GMatrixSymmetric & operator=(const GMatrixSymmetric &matrix)
Matrix assignment operator.
double get_max_element(void) const
Returns maximum matrix element.
virtual GMatrixSymmetric & operator/=(const double &scalar)
Divide matrix elements.
GArf operator*(const GArf &arf, const double &scale)
Auxiliary Response File scaling operator friend.
virtual GMatrixSymmetric operator+(const GMatrixSymmetric &matrix) const
Binary matrix addition.
GMatrixSymmetric transpose(void) const
Return transposed matrix.
virtual GVector operator*(const GVector &v) const
Vector multiplication.
GMatrix extract_upper_triangle(void) const
Extract upper triangle of matrix.
void init_members(void)
Initialise class mambers.
virtual double max(void) const
Return maximum matrix element.
virtual double sum(void) const
Sum matrix elements.
virtual double fill(void) const
Determine fill of matrix.
void copy_members(const GMatrixSymmetric &matrix)
Copy class members.
GMatrixSymmetric abs(void) const
Return absolute of matrix.
GMatrixSymmetric cholesky_decompose(const bool &compress=true) const
Return Cholesky decomposition.
GVector solve(const GVector &vector) const
Solves linear matrix equation.
virtual void add_to_column(const int &column, const GVector &vector)
Add vector column into matrix.
virtual GVector row(const int &row) const
Extract row as vector from matrix.
virtual double & at(const int &row, const int &column)
Return reference to matrix element.
Generic matrix class definition.
int * m_inx
Index array of non-zero rows/columns.
void alloc_members(const int &rows, const int &columns)
Allocates matrix memory.
virtual double min(void) const
Return minimum matrix element.
const int & columns(void) const
Return number of matrix columns.
void set_inx(void)
Set index selection.