* Base class for block matrix accessors, implementing the stepping through
* a matrix.
*/
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
class AccessorBase
{
public:
/**
* Accessor classes in block matrices.
*/
- template <class BlockMatrixType, bool Constness>
+ template <typename BlockMatrixType, bool Constness>
class Accessor;
/**
* Block matrix accessor for non const matrices.
*/
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
class Accessor<BlockMatrixType, false> : public AccessorBase<BlockMatrixType>
{
public:
* Block matrix accessor for constant matrices, implementing the stepping
* through a matrix.
*/
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
class Accessor<BlockMatrixType, true> : public AccessorBase<BlockMatrixType>
{
public:
*
* The function returns a reference to <tt>this</tt>.
*/
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
BlockMatrixBase &
copy_from(const BlockMatrixType &source);
namespace BlockMatrixIterators
{
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline AccessorBase<BlockMatrixType>::AccessorBase()
: row_block(0)
, col_block(0)
{}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline unsigned int
AccessorBase<BlockMatrixType>::block_row() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline unsigned int
AccessorBase<BlockMatrixType>::block_column() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline Accessor<BlockMatrixType, true>::Accessor(
const BlockMatrixType *matrix,
const size_type row,
}
- // template <class BlockMatrixType>
+ // template <typename BlockMatrixType>
// inline
// Accessor<BlockMatrixType, true>::Accessor (const
// Accessor<BlockMatrixType, true>& other)
// }
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline Accessor<BlockMatrixType, true>::Accessor(
const Accessor<BlockMatrixType, false> &other)
: matrix(other.matrix)
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, true>::size_type
Accessor<BlockMatrixType, true>::row() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, true>::size_type
Accessor<BlockMatrixType, true>::column() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, true>::value_type
Accessor<BlockMatrixType, true>::value() const
{
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline void
Accessor<BlockMatrixType, true>::advance()
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline bool
Accessor<BlockMatrixType, true>::operator==(const Accessor &a) const
{
//----------------------------------------------------------------------//
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline Accessor<BlockMatrixType, false>::Accessor(BlockMatrixType *matrix,
const size_type row,
const size_type col)
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, false>::size_type
Accessor<BlockMatrixType, false>::row() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, false>::size_type
Accessor<BlockMatrixType, false>::column() const
{
}
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline typename Accessor<BlockMatrixType, false>::value_type
Accessor<BlockMatrixType, false>::value() const
{
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline void
Accessor<BlockMatrixType, false>::set_value(
typename Accessor<BlockMatrixType, false>::value_type newval) const
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline void
Accessor<BlockMatrixType, false>::advance()
{
- template <class BlockMatrixType>
+ template <typename BlockMatrixType>
inline bool
Accessor<BlockMatrixType, false>::operator==(const Accessor &a) const
{
}
-template <class MatrixType>
-template <class BlockMatrixType>
+template <typename MatrixType>
+template <typename BlockMatrixType>
inline BlockMatrixBase<MatrixType> &
BlockMatrixBase<MatrixType>::copy_from(const BlockMatrixType &source)
{
}
-template <class MatrixType>
+template <typename MatrixType>
std::size_t
BlockMatrixBase<MatrixType>::memory_consumption() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::clear()
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::BlockType &
BlockMatrixBase<MatrixType>::block(const unsigned int row,
const unsigned int column)
-template <class MatrixType>
+template <typename MatrixType>
inline const typename BlockMatrixBase<MatrixType>::BlockType &
BlockMatrixBase<MatrixType>::block(const unsigned int row,
const unsigned int column) const
}
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::size_type
BlockMatrixBase<MatrixType>::m() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::size_type
BlockMatrixBase<MatrixType>::n() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline unsigned int
BlockMatrixBase<MatrixType>::n_block_cols() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline unsigned int
BlockMatrixBase<MatrixType>::n_block_rows() const
{
// Write the single set manually,
// since the other function has a lot
// of overhead in that case.
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::set(const size_type i,
const size_type j,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::set(const std::vector<size_type> &row_indices,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::set(const std::vector<size_type> &indices,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::set(const size_type row,
// This is a very messy function, since
// we need to calculate to each position
// the location in the global array.
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::set(const size_type row,
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::add(const size_type i,
const size_type j,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::add(const std::vector<size_type> &row_indices,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::add(const std::vector<size_type> &indices,
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::add(const size_type row,
// This is a very messy function, since
// we need to calculate to each position
// the location in the global array.
-template <class MatrixType>
+template <typename MatrixType>
template <typename number>
inline void
BlockMatrixBase<MatrixType>::add(const size_type row,
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::add(const value_type factor,
const BlockMatrixBase<MatrixType> &matrix)
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::operator()(const size_type i,
const size_type j) const
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::el(const size_type i, const size_type j) const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::diag_element(const size_type i) const
{
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::compress(VectorOperation::values operation)
{
-template <class MatrixType>
+template <typename MatrixType>
inline BlockMatrixBase<MatrixType> &
BlockMatrixBase<MatrixType>::operator*=(const value_type factor)
{
-template <class MatrixType>
+template <typename MatrixType>
inline BlockMatrixBase<MatrixType> &
BlockMatrixBase<MatrixType>::operator/=(const value_type factor)
{
-template <class MatrixType>
+template <typename MatrixType>
const BlockIndices &
BlockMatrixBase<MatrixType>::get_row_indices() const
{
-template <class MatrixType>
+template <typename MatrixType>
const BlockIndices &
BlockMatrixBase<MatrixType>::get_column_indices() const
{
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
void
BlockMatrixBase<MatrixType>::vmult_block_block(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType, typename VectorType>
void
BlockMatrixBase<MatrixType>::vmult_nonblock_block(
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType, typename VectorType>
void
BlockMatrixBase<MatrixType>::vmult_block_nonblock(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
template <typename VectorType>
void
BlockMatrixBase<MatrixType>::vmult_nonblock_nonblock(
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
void
BlockMatrixBase<MatrixType>::vmult_add(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
void
BlockMatrixBase<MatrixType>::Tvmult_block_block(
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType, typename VectorType>
void
BlockMatrixBase<MatrixType>::Tvmult_block_nonblock(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType, typename VectorType>
void
BlockMatrixBase<MatrixType>::Tvmult_nonblock_block(
-template <class MatrixType>
+template <typename MatrixType>
template <typename VectorType>
void
BlockMatrixBase<MatrixType>::Tvmult_nonblock_nonblock(
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
void
BlockMatrixBase<MatrixType>::Tvmult_add(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::matrix_norm_square(const BlockVectorType &v) const
-template <class MatrixType>
+template <typename MatrixType>
typename BlockMatrixBase<MatrixType>::real_type
BlockMatrixBase<MatrixType>::frobenius_norm() const
{
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::matrix_scalar_product(
-template <class MatrixType>
+template <typename MatrixType>
template <typename BlockVectorType>
typename BlockMatrixBase<MatrixType>::value_type
BlockMatrixBase<MatrixType>::residual(BlockVectorType & dst,
-template <class MatrixType>
+template <typename MatrixType>
inline void
BlockMatrixBase<MatrixType>::print(std::ostream &out,
const bool alternative_output) const
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::const_iterator
BlockMatrixBase<MatrixType>::begin() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::const_iterator
BlockMatrixBase<MatrixType>::end() const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::const_iterator
BlockMatrixBase<MatrixType>::begin(const size_type r) const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::const_iterator
BlockMatrixBase<MatrixType>::end(const size_type r) const
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::iterator
BlockMatrixBase<MatrixType>::begin()
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::iterator
BlockMatrixBase<MatrixType>::end()
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::iterator
BlockMatrixBase<MatrixType>::begin(const size_type r)
{
-template <class MatrixType>
+template <typename MatrixType>
inline typename BlockMatrixBase<MatrixType>::iterator
BlockMatrixBase<MatrixType>::end(const size_type r)
{
-template <class MatrixType>
+template <typename MatrixType>
void
BlockMatrixBase<MatrixType>::collect_sizes()
{
-template <class MatrixType>
+template <typename MatrixType>
void
BlockMatrixBase<MatrixType>::prepare_add_operation()
{
-template <class MatrixType>
+template <typename MatrixType>
void
BlockMatrixBase<MatrixType>::prepare_set_operation()
{