typedef typename BaseClass::iterator iterator;
typedef typename BaseClass::const_iterator const_iterator;
+/**
+ * @name Constructors and initalization
+ */
+//@{
/**
* Constructor; initializes the
* matrix to be empty, without
* set to zero by this function.
*/
virtual void reinit (const BlockSparsityPattern &sparsity);
+//@}
+/**
+ * @name Information on the matrix
+ */
+//@{
/**
* Return whether the object is
* empty. It is empty if either
*/
unsigned int n_actually_nonzero_elements (const double threshold = 0.0) const;
+ /**
+ * Return a (constant) reference
+ * to the underlying sparsity
+ * pattern of this matrix.
+ *
+ * Though the return value is
+ * declared <tt>const</tt>, you
+ * should be aware that it may
+ * change if you call any
+ * nonconstant function of
+ * objects which operate on it.
+ */
+ const BlockSparsityPattern &
+ get_sparsity_pattern () const;
+
+ /**
+ * Determine an estimate for the
+ * memory consumption (in bytes)
+ * of this object.
+ */
+ std::size_t memory_consumption () const;
+//@}
+
+/**
+ * @name Multiplications
+ */
+//@{
/**
* Matrix-vector multiplication:
* let $dst = M*src$ with $M$
template <typename nonblock_number>
void Tvmult (Vector<nonblock_number> &dst,
const Vector<nonblock_number> &src) const;
+//@}
+/**
+ * @name Preconditioning methods
+ */
+//@{
/**
* Apply the Jacobi
* preconditioner, which
void precondition_Jacobi (Vector<number2> &dst,
const Vector<number2> &src,
const number omega = 1.) const;
+//@}
+/**
+ * @name Input/Output
+ */
+//@{
/**
* Print the matrix in the usual
* format, i.e. as a matrix and
const unsigned int width = 0,
const char *zero_string = " ",
const double denominator = 1.) const;
-
- /**
- * Return a (constant) reference
- * to the underlying sparsity
- * pattern of this matrix.
- *
- * Though the return value is
- * declared <tt>const</tt>, you
- * should be aware that it may
- * change if you call any
- * nonconstant function of
- * objects which operate on it.
- */
- const BlockSparsityPattern &
- get_sparsity_pattern () const;
-
- /**
- * Determine an estimate for the
- * memory consumption (in bytes)
- * of this object.
- */
- std::size_t memory_consumption () const;
-
- /** @addtogroup Exceptions
+//@}
+ /** @addtogroup Exceptions
* @{ */
/**
*/
DeclException0 (ExcBlockDimensionMismatch);
//@}
+
private:
/**
* Pointer to the block sparsity
* the STL container classes.
*/
typedef number value_type;
-
+
+/**
+ * @name Constructors and initalization
+ */
+//@{
/**
* Constructor. Initializes an
* empty matrix of dimension zero
* its sparsity pattern.
*/
void clear ();
-
+//@}
+/**
+ * @name Information on the matrix
+ */
+//@{
/**
* Return whether the object is
* empty. It is empty if
* elements of this matrix.
*/
unsigned int n_nonzero_elements () const;
-
+
+ /**
+ * Determine an estimate for the
+ * memory consumption (in bytes)
+ * of this object.
+ */
+ std::size_t memory_consumption () const;
+
+ /**
+ * Print statistics. If @p full
+ * is @p true, prints a
+ * histogram of all existing row
+ * lengths and allocated row
+ * lengths. Otherwise, just the
+ * relation of allocated and used
+ * entries is shown.
+ */
+ template <class STREAM>
+ void print_statistics (STREAM& s, bool full = false);
+
/**
+ * Compute numbers of entries.
+ *
+ * In the first three arguments,
+ * this function returns the
+ * number of entries used,
+ * allocated and reserved by this
+ * matrix.
+ *
+ * If the final argument is true,
+ * the number of entries in each
+ * line is printed as well.
+ */
+ void compute_statistics (unsigned int& used,
+ unsigned int& allocated,
+ unsigned int& reserved,
+ std::vector<unsigned int>& used_by_line,
+ const bool compute_by_line) const;
+//@}
+/**
+ * @name Modifying entries
+ */
+//@{
+ /**
* Set the element <tt>(i,j)</tt> to
* @p value. Allocates the entry,
* if it does not exist and
template <class MATRIX>
SparseMatrixEZ<number> &
copy_from (const MATRIX &source);
-
+
/**
* Add @p matrix scaled by
* @p factor to this matrix.
template <class MATRIX>
void add (const number factor,
const MATRIX &matrix);
-
+//@}
+/**
+ * @name Entry Access
+ */
+//@{
/**
* Return the value of the entry
* (i,j). This may be an
*/
number el (const unsigned int i,
const unsigned int j) const;
-
+//@}
+/**
+ * @name Multiplications
+ */
+//@{
/**
* Matrix-vector multiplication:
* let $dst = M*src$ with $M$
template <typename somenumber>
void Tvmult_add (Vector<somenumber> &dst,
const Vector<somenumber> &src) const;
-
+//@}
+/**
+ * @name Matrix norms
+ */
+//@{
/**
* Frobenius-norm of the matrix.
*/
number l2_norm () const;
-
+//@}
+/**
+ * @name Preconditioning methods
+ */
+//@{
/**
* Apply the Jacobi
* preconditioner, which
void conjugate_add (const MATRIXA& A,
const MATRIXB& B,
const bool transpose = false);
-
+//@}
+/**
+ * @name Iterators
+ */
+//@{
/**
* STL-like iterator with the
* first existing entry.
* different from <tt>end()</tt>!
*/
const_iterator end (const unsigned int r) const;
-
+//@}
+/**
+ * @name Input/Output
+ */
+//@{
/**
* Print the matrix to the given
* stream, using the format
* more.
*/
void block_read (std::istream &in);
-
-
- /**
- * Determine an estimate for the
- * memory consumption (in bytes)
- * of this object.
- */
- std::size_t memory_consumption () const;
-
- /**
- * Print statistics. If @p full
- * is @p true, prints a
- * histogram of all existing row
- * lengths and allocated row
- * lengths. Otherwise, just the
- * relation of allocated and used
- * entries is shown.
- */
- template <class STREAM>
- void print_statistics (STREAM& s, bool full = false);
-
- /**
- * Compute numbers of entries.
- *
- * In the first three arguments,
- * this function returns the
- * number of entries used,
- * allocated and reserved by this
- * matrix.
- *
- * If the final argument is true,
- * the number of entries in each
- * line is printed as well.
- */
- void compute_statistics (unsigned int& used,
- unsigned int& allocated,
- unsigned int& reserved,
- std::vector<unsigned int>& used_by_line,
- const bool compute_by_line) const;
-
+//@}
/** @addtogroup Exceptions
* @{ */