Loading...
Searching...
No Matches
densevector.hh
Go to the documentation of this file.
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
#ifndef DUNE_DENSEVECTOR_HH
#define DUNE_DENSEVECTOR_HH
#include <algorithm>
#include <limits>
#include <type_traits>
#include "std/cmath.hh"
#include "genericiterator.hh"
#include "ftraits.hh"
#include "matvectraits.hh"
#include "promotiontraits.hh"
#include "dotproduct.hh"
#include "boundschecking.hh"
namespace Dune {
// forward declaration of template
template<typename V> class DenseVector;
template<typename V>
struct FieldTraits< DenseVector<V> >
{
typedef typename FieldTraits< typename DenseMatVecTraits<V>::value_type >::field_type field_type;
typedef typename FieldTraits< typename DenseMatVecTraits<V>::value_type >::real_type real_type;
};
namespace fvmeta
{
template<class K>
constexpr typename FieldTraits<K>::real_type absreal (const K& k)
{
using Std::abs;
return abs(k);
}
template<class K>
constexpr typename FieldTraits<K>::real_type absreal (const std::complex<K>& c)
{
using Std::abs;
return abs(c.real()) + abs(c.imag());
}
template<class K>
constexpr typename FieldTraits<K>::real_type abs2 (const K& k)
{
return k*k;
}
template<class K>
constexpr typename FieldTraits<K>::real_type abs2 (const std::complex<K>& c)
{
return c.real()*c.real() + c.imag()*c.imag();
}
template<class K, bool isInteger = std::numeric_limits<K>::is_integer>
struct Sqrt
{
static constexpr typename FieldTraits<K>::real_type sqrt (const K& k)
{
using Std::sqrt;
return sqrt(k);
}
};
template<class K>
struct Sqrt<K, true>
{
static constexpr typename FieldTraits<K>::real_type sqrt (const K& k)
{
using Std::sqrt;
return typename FieldTraits<K>::real_type(sqrt(double(k)));
}
};
template<class K>
static constexpr typename FieldTraits<K>::real_type sqrt (const K& k)
{
return Sqrt<K>::sqrt(k);
}
}
template<class C, class T, class R =T&>
class DenseIterator :
public Dune::RandomAccessIteratorFacade<DenseIterator<C,T,R>,T, R, std::ptrdiff_t>
{
friend class DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type >;
friend class DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type >;
typedef DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type > MutableIterator;
typedef DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type > ConstIterator;
public:
typedef std::ptrdiff_t DifferenceType;
typedef typename C::size_type SizeType;
// Constructors needed by the base iterators.
constexpr DenseIterator()
: container_(0), position_()
{}
constexpr DenseIterator(C& cont, SizeType pos)
: container_(&cont), position_(pos)
{}
constexpr DenseIterator(const MutableIterator & other)
{
(*this) = other;
}
constexpr DenseIterator(const ConstIterator & other)
{
(*this) = other;
}
constexpr DenseIterator & operator= (const ConstIterator & other) {
container_ = other.container_;
position_ = other.position_;
return *this;
}
constexpr DenseIterator & operator= (const MutableIterator & other) {
container_ = other.container_;
position_ = other.position_;
return *this;
}
// Methods needed by the forward iterator
constexpr bool equals(const MutableIterator &other) const
{
return position_ == other.position_ && container_ == other.container_;
}
constexpr bool equals(const ConstIterator & other) const
{
return position_ == other.position_ && container_ == other.container_;
}
constexpr R dereference() const {
return container_->operator[](position_);
}
constexpr void increment(){
++position_;
}
// Additional function needed by BidirectionalIterator
constexpr void decrement(){
--position_;
}
// Additional function needed by RandomAccessIterator
constexpr R elementAt(DifferenceType i) const {
return container_->operator[](position_+i);
}
constexpr void advance(DifferenceType n){
position_=position_+n;
}
constexpr DifferenceType distanceTo(DenseIterator<const typename std::remove_const<C>::type,const typename std::remove_const<T>::type> other) const
{
assert(other.container_==container_);
return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
}
constexpr DifferenceType distanceTo(DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type> other) const
{
assert(other.container_==container_);
return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
}
constexpr SizeType index () const
{
return this->position_;
}
private:
C *container_;
SizeType position_;
};
template<typename V>
class DenseVector
{
typedef DenseMatVecTraits<V> Traits;
// typedef typename Traits::value_type K;
// Curiously recurring template pattern
constexpr V & asImp() { return static_cast<V&>(*this); }
constexpr const V & asImp() const { return static_cast<const V&>(*this); }
protected:
// construction allowed to derived classes only
constexpr DenseVector() = default;
// copying only allowed by derived classes
constexpr DenseVector(const DenseVector&) = default;
public:
//===== type definitions and constants
typedef typename Traits::derived_type derived_type;
typedef typename Traits::value_type value_type;
typedef typename FieldTraits< value_type >::field_type field_type;
typedef typename Traits::value_type block_type;
typedef typename Traits::size_type size_type;
constexpr static int blocklevel = 1;
//===== assignment from scalar
constexpr inline derived_type& operator= (const value_type& k)
{
for (size_type i=0; i<size(); i++)
asImp()[i] = k;
return asImp();
}
//===== assignment from other DenseVectors
protected:
constexpr DenseVector& operator=(const DenseVector&) = default;
public:
template <typename W,
std::enable_if_t<
std::is_assignable<value_type&, typename DenseVector<W>::value_type>::value, int> = 0>
constexpr derived_type& operator= (const DenseVector<W>& other)
{
assert(other.size() == size());
for (size_type i=0; i<size(); i++)
asImp()[i] = other[i];
return asImp();
}
//===== access to components
constexpr value_type & operator[] (size_type i)
{
return asImp()[i];
}
constexpr const value_type & operator[] (size_type i) const
{
return asImp()[i];
}
constexpr value_type& front()
{
return asImp()[0];
}
constexpr const value_type& front() const
{
return asImp()[0];
}
constexpr value_type& back()
{
return asImp()[size()-1];
}
constexpr const value_type& back() const
{
return asImp()[size()-1];
}
constexpr bool empty() const
{
return size() == 0;
}
constexpr size_type size() const
{
return asImp().size();
}
typedef DenseIterator<DenseVector,value_type> Iterator;
typedef Iterator iterator;
constexpr Iterator begin ()
{
return Iterator(*this,0);
}
constexpr Iterator end ()
{
return Iterator(*this,size());
}
constexpr Iterator beforeEnd ()
{
return Iterator(*this,size()-1);
}
constexpr Iterator beforeBegin ()
{
return Iterator(*this,-1);
}
constexpr Iterator find (size_type i)
{
return Iterator(*this,std::min(i,size()));
}
typedef DenseIterator<const DenseVector,const value_type> ConstIterator;
typedef ConstIterator const_iterator;
constexpr ConstIterator begin () const
{
return ConstIterator(*this,0);
}
constexpr ConstIterator end () const
{
return ConstIterator(*this,size());
}
constexpr ConstIterator beforeEnd () const
{
return ConstIterator(*this,size()-1);
}
constexpr ConstIterator beforeBegin () const
{
return ConstIterator(*this,-1);
}
constexpr ConstIterator find (size_type i) const
{
return ConstIterator(*this,std::min(i,size()));
}
//===== vector space arithmetic
template <class Other>
constexpr derived_type& operator+= (const DenseVector<Other>& x)
{
DUNE_ASSERT_BOUNDS(x.size() == size());
for (size_type i=0; i<size(); i++)
(*this)[i] += x[i];
return asImp();
}
template <class Other>
constexpr derived_type& operator-= (const DenseVector<Other>& x)
{
DUNE_ASSERT_BOUNDS(x.size() == size());
for (size_type i=0; i<size(); i++)
(*this)[i] -= x[i];
return asImp();
}
template <class Other>
constexpr derived_type operator+ (const DenseVector<Other>& b) const
{
derived_type z = asImp();
return (z+=b);
}
template <class Other>
constexpr derived_type operator- (const DenseVector<Other>& b) const
{
derived_type z = asImp();
return (z-=b);
}
constexpr derived_type operator- () const
{
V result;
using idx_type = typename decltype(result)::size_type;
for (idx_type i = 0; i < size(); ++i)
result[i] = -asImp()[i];
return result;
}
template <typename ValueType>
constexpr typename std::enable_if<
std::is_convertible<ValueType, value_type>::value,
derived_type
>::type&
operator+= (const ValueType& kk)
{
const value_type& k = kk;
for (size_type i=0; i<size(); i++)
(*this)[i] += k;
return asImp();
}
template <typename ValueType>
constexpr typename std::enable_if<
std::is_convertible<ValueType, value_type>::value,
derived_type
>::type&
operator-= (const ValueType& kk)
{
const value_type& k = kk;
for (size_type i=0; i<size(); i++)
(*this)[i] -= k;
return asImp();
}
template <typename FieldType>
constexpr typename std::enable_if<
std::is_convertible<FieldType, field_type>::value,
derived_type
>::type&
operator*= (const FieldType& kk)
{
const field_type& k = kk;
for (size_type i=0; i<size(); i++)
(*this)[i] *= k;
return asImp();
}
template <typename FieldType>
constexpr typename std::enable_if<
std::is_convertible<FieldType, field_type>::value,
derived_type
>::type&
operator/= (const FieldType& kk)
{
const field_type& k = kk;
for (size_type i=0; i<size(); i++)
(*this)[i] /= k;
return asImp();
}
template <class Other>
constexpr bool operator== (const DenseVector<Other>& x) const
{
DUNE_ASSERT_BOUNDS(x.size() == size());
for (size_type i=0; i<size(); i++)
if ((*this)[i]!=x[i])
return false;
return true;
}
template <class Other>
constexpr bool operator!= (const DenseVector<Other>& x) const
{
return !operator==(x);
}
template <class Other>
constexpr derived_type& axpy (const field_type& a, const DenseVector<Other>& x)
{
DUNE_ASSERT_BOUNDS(x.size() == size());
for (size_type i=0; i<size(); i++)
(*this)[i] += a*x[i];
return asImp();
}
template<class Other>
constexpr typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType operator* (const DenseVector<Other>& x) const {
typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
PromotedType result(0);
assert(x.size() == size());
for (size_type i=0; i<size(); i++) {
result += PromotedType((*this)[i]*x[i]);
}
return result;
}
template<class Other>
constexpr typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType dot(const DenseVector<Other>& x) const {
typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
PromotedType result(0);
assert(x.size() == size());
for (size_type i=0; i<size(); i++) {
result += Dune::dot((*this)[i],x[i]);
}
return result;
}
//===== norms
constexpr typename FieldTraits<value_type>::real_type one_norm() const {
using std::abs;
typename FieldTraits<value_type>::real_type result( 0 );
for (size_type i=0; i<size(); i++)
result += abs((*this)[i]);
return result;
}
constexpr typename FieldTraits<value_type>::real_type one_norm_real () const
{
typename FieldTraits<value_type>::real_type result( 0 );
for (size_type i=0; i<size(); i++)
result += fvmeta::absreal((*this)[i]);
return result;
}
constexpr typename FieldTraits<value_type>::real_type two_norm () const
{
typename FieldTraits<value_type>::real_type result( 0 );
for (size_type i=0; i<size(); i++)
result += fvmeta::abs2((*this)[i]);
return fvmeta::sqrt(result);
}
constexpr typename FieldTraits<value_type>::real_type two_norm2 () const
{
typename FieldTraits<value_type>::real_type result( 0 );
for (size_type i=0; i<size(); i++)
result += fvmeta::abs2((*this)[i]);
return result;
}
template <typename vt = value_type,
typename std::enable_if<!HasNaN<vt>::value, int>::type = 0>
constexpr typename FieldTraits<vt>::real_type infinity_norm() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::abs;
using std::max;
real_type norm = 0;
for (auto const &x : *this) {
real_type const a = abs(x);
norm = max(a, norm);
}
return norm;
}
template <typename vt = value_type,
typename std::enable_if<!HasNaN<vt>::value, int>::type = 0>
constexpr typename FieldTraits<vt>::real_type infinity_norm_real() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::max;
real_type norm = 0;
for (auto const &x : *this) {
real_type const a = fvmeta::absreal(x);
norm = max(a, norm);
}
return norm;
}
template <typename vt = value_type,
typename std::enable_if<HasNaN<vt>::value, int>::type = 0>
constexpr typename FieldTraits<vt>::real_type infinity_norm() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::abs;
using std::max;
real_type norm = 0;
real_type isNaN = 1;
for (auto const &x : *this) {
real_type const a = abs(x);
norm = max(a, norm);
isNaN += a;
}
return norm * (isNaN / isNaN);
}
template <typename vt = value_type,
typename std::enable_if<HasNaN<vt>::value, int>::type = 0>
constexpr typename FieldTraits<vt>::real_type infinity_norm_real() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::max;
real_type norm = 0;
real_type isNaN = 1;
for (auto const &x : *this) {
real_type const a = fvmeta::absreal(x);
norm = max(a, norm);
isNaN += a;
}
return norm * (isNaN / isNaN);
}
//===== sizes
constexpr size_type N () const
{
return size();
}
constexpr size_type dim () const
{
return size();
}
};
template<typename V>
std::ostream& operator<< (std::ostream& s, const DenseVector<V>& v)
{
for (typename DenseVector<V>::size_type i=0; i<v.size(); i++)
s << ((i>0) ? " " : "") << v[i];
return s;
}
} // end namespace
#endif // DUNE_DENSEVECTOR_HH
ftraits.hh
Type traits to determine the type of reals (when working with complex numbers).
cmath.hh
dotproduct.hh
Provides the functions dot(a,b) := and dotT(a,b) := .
matvectraits.hh
Documentation of the traits classes you need to write for each implementation of DenseVector or Dense...
boundschecking.hh
Macro for wrapping boundary checks.
genericiterator.hh
Implements a generic iterator class for writing stl conformant iterators.
promotiontraits.hh
Compute type of the result of an arithmetic operation involving two different number types.
DUNE_ASSERT_BOUNDS
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition boundschecking.hh:30
Dune::dot
auto dot(const A &a, const B &b) -> typename std::enable_if< IsNumber< A >::value &&!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,...
Definition dotproduct.hh:40
Dune::operator<<
std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
Definition bigunsignedint.hh:301
Dune::operator*
constexpr decltype(auto) operator*() const
Dereferencing operator.
Definition iteratorfacades.hh:1119
std
STL namespace.
Dune
Dune namespace
Definition alignedallocator.hh:13
Dune::Std::sqrt
constexpr auto sqrt(T t)
Definition cmath.hh:39
Dune::Std::abs
constexpr T abs(T t)
Definition cmath.hh:27
Dune::DenseVector
Interface for a class of dense vectors over a given field.
Definition densevector.hh:244
Dune::DenseVector::value_type
Traits::value_type value_type
export the type representing the field
Definition densevector.hh:265
Dune::DenseVector::operator-
constexpr derived_type operator-() const
Vector negation.
Definition densevector.hh:469
Dune::DenseVector::front
constexpr const value_type & front() const
return reference to first element
Definition densevector.hh:327
Dune::DenseVector::const_iterator
ConstIterator const_iterator
typedef for stl compliant access
Definition densevector.hh:396
Dune::DenseVector::back
constexpr const value_type & back() const
return reference to last element
Definition densevector.hh:339
Dune::DenseVector::iterator
Iterator iterator
typedef for stl compliant access
Definition densevector.hh:359
Dune::DenseVector::N
constexpr size_type N() const
number of blocks in the vector (are of size 1 here)
Definition densevector.hh:742
Dune::DenseVector::empty
constexpr bool empty() const
checks whether the container is empty
Definition densevector.hh:345
Dune::DenseVector::operator*=
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator*=(const FieldType &kk)
vector space multiplication with scalar
Definition densevector.hh:538
Dune::DenseVector::ConstIterator
DenseIterator< const DenseVector, const value_type > ConstIterator
ConstIterator class for sequential access.
Definition densevector.hh:394
Dune::DenseVector::two_norm
constexpr FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition densevector.hh:656
Dune::DenseVector::axpy
constexpr derived_type & axpy(const field_type &a, const DenseVector< Other > &x)
vector space axpy operation ( *this += a x )
Definition densevector.hh:590
Dune::DenseVector::derived_type
Traits::derived_type derived_type
type of derived vector class
Definition densevector.hh:262
Dune::DenseVector::end
constexpr Iterator end()
end iterator
Definition densevector.hh:368
Dune::DenseVector::operator=
constexpr DenseVector & operator=(const DenseVector &)=default
Assignment operator for other DenseVector of same type.
Dune::DenseVector::operator+=
constexpr derived_type & operator+=(const DenseVector< Other > &x)
vector space addition
Definition densevector.hh:434
Dune::DenseVector::operator+
constexpr derived_type operator+(const DenseVector< Other > &b) const
Binary vector addition.
Definition densevector.hh:454
Dune::DenseVector::two_norm2
constexpr FieldTraits< value_type >::real_type two_norm2() const
square of two norm (sum over squared values of entries), need for block recursion
Definition densevector.hh:665
Dune::DenseVector< DynamicVector< K, Allocator > >::blocklevel
static constexpr int blocklevel
Definition densevector.hh:277
Dune::DenseVector::operator!=
constexpr bool operator!=(const DenseVector< Other > &x) const
Binary vector incomparison.
Definition densevector.hh:582
Dune::DenseVector::size_type
Traits::size_type size_type
The type used for the index access and size operation.
Definition densevector.hh:274
Dune::DenseVector::beforeEnd
constexpr ConstIterator beforeEnd() const
Definition densevector.hh:412
Dune::DenseVector::Iterator
DenseIterator< DenseVector, value_type > Iterator
Iterator class for sequential access.
Definition densevector.hh:357
Dune::DenseVector::beforeEnd
constexpr Iterator beforeEnd()
Definition densevector.hh:375
Dune::DenseVector::begin
constexpr ConstIterator begin() const
begin ConstIterator
Definition densevector.hh:399
Dune::DenseVector::operator/=
constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & operator/=(const FieldType &kk)
vector space division by scalar
Definition densevector.hh:560
Dune::DenseVector::end
constexpr ConstIterator end() const
end ConstIterator
Definition densevector.hh:405
Dune::DenseVector::dim
constexpr size_type dim() const
dimension of the vector space
Definition densevector.hh:748
Dune::DenseVector::infinity_norm
constexpr FieldTraits< vt >::real_type infinity_norm() const
infinity norm (maximum of absolute values of entries)
Definition densevector.hh:676
Dune::DenseVector::operator-=
constexpr derived_type & operator-=(const DenseVector< Other > &x)
vector space subtraction
Definition densevector.hh:444
Dune::DenseVector::DenseVector
constexpr DenseVector()=default
Dune::DenseVector::back
constexpr value_type & back()
return reference to last element
Definition densevector.hh:333
Dune::DenseVector::operator=
constexpr derived_type & operator=(const value_type &k)
Assignment operator for scalar.
Definition densevector.hh:281
Dune::DenseVector::one_norm_real
constexpr FieldTraits< value_type >::real_type one_norm_real() const
simplified one norm (uses Manhattan norm for complex values)
Definition densevector.hh:647
Dune::DenseVector::beforeBegin
constexpr Iterator beforeBegin()
Definition densevector.hh:382
Dune::DenseVector::block_type
Traits::value_type block_type
export the type representing the components
Definition densevector.hh:271
Dune::DenseVector::find
constexpr Iterator find(size_type i)
return iterator to given element or end()
Definition densevector.hh:388
Dune::DenseVector::infinity_norm_real
constexpr FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition densevector.hh:692
Dune::DenseVector::field_type
FieldTraits< value_type >::field_type field_type
export the type representing the field
Definition densevector.hh:268
Dune::DenseVector::DenseVector
constexpr DenseVector(const DenseVector &)=default
Dune::DenseVector::operator==
constexpr bool operator==(const DenseVector< Other > &x) const
Binary vector comparison.
Definition densevector.hh:570
Dune::DenseVector::begin
constexpr Iterator begin()
begin iterator
Definition densevector.hh:362
Dune::DenseVector::beforeBegin
constexpr ConstIterator beforeBegin() const
Definition densevector.hh:419
Dune::DenseVector::one_norm
constexpr FieldTraits< value_type >::real_type one_norm() const
one norm (sum over absolute values of entries)
Definition densevector.hh:637
Dune::DenseVector::dot
constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType dot(const DenseVector< Other > &x) const
vector dot product which corresponds to Petsc's VecDot
Definition densevector.hh:624
Dune::DenseVector::find
constexpr ConstIterator find(size_type i) const
return iterator to given element or end()
Definition densevector.hh:425
Dune::DenseVector::front
constexpr value_type & front()
return reference to first element
Definition densevector.hh:321
Dune::DenseVector::size
constexpr size_type size() const
size method
Definition densevector.hh:351
Dune::DenseVector::operator[]
constexpr value_type & operator[](size_type i)
random access
Definition densevector.hh:310
Dune::FieldTraits< DenseVector< V > >::real_type
FieldTraits< typenameDenseMatVecTraits< V >::value_type >::real_type real_type
Definition densevector.hh:29
Dune::FieldTraits< DenseVector< V > >::field_type
FieldTraits< typenameDenseMatVecTraits< V >::value_type >::field_type field_type
Definition densevector.hh:28
Dune::DenseIterator
Generic iterator class for dense vector and matrix implementations.
Definition densevector.hh:132
Dune::DenseIterator::dereference
constexpr R dereference() const
Definition densevector.hh:193
Dune::DenseIterator::elementAt
constexpr R elementAt(DifferenceType i) const
Definition densevector.hh:207
Dune::DenseIterator::DenseIterator
constexpr DenseIterator(const MutableIterator &other)
Definition densevector.hh:159
Dune::DenseIterator::distanceTo
constexpr DifferenceType distanceTo(DenseIterator< typename std::remove_const< C >::type, typename std::remove_const< T >::type > other) const
Definition densevector.hh:221
Dune::DenseIterator::DenseIterator
constexpr DenseIterator(const ConstIterator &other)
Definition densevector.hh:164
Dune::DenseIterator::operator=
constexpr DenseIterator & operator=(const ConstIterator &other)
Definition densevector.hh:169
Dune::DenseIterator::equals
constexpr bool equals(const MutableIterator &other) const
Definition densevector.hh:182
Dune::DenseIterator::equals
constexpr bool equals(const ConstIterator &other) const
Definition densevector.hh:188
Dune::DenseIterator::index
constexpr SizeType index() const
return index
Definition densevector.hh:228
Dune::DenseIterator::DenseIterator
constexpr DenseIterator()
Definition densevector.hh:151
Dune::DenseIterator::increment
constexpr void increment()
Definition densevector.hh:197
Dune::DenseIterator::decrement
constexpr void decrement()
Definition densevector.hh:202
Dune::DenseIterator< DenseMatrix, row_type, row_reference >::DifferenceType
std::ptrdiff_t DifferenceType
Definition densevector.hh:143
Dune::DenseIterator::distanceTo
constexpr DifferenceType distanceTo(DenseIterator< const typename std::remove_const< C >::type, const typename std::remove_const< T >::type > other) const
Definition densevector.hh:215
Dune::DenseIterator::DenseIterator
constexpr DenseIterator(C &cont, SizeType pos)
Definition densevector.hh:155
Dune::DenseIterator::advance
constexpr void advance(DifferenceType n)
Definition densevector.hh:211
Dune::DenseIterator< DenseMatrix, row_type, row_reference >::SizeType
DenseMatrix::size_type SizeType
Definition densevector.hh:148
Dune::FieldTraits
Definition ftraits.hh:26
Dune::FieldTraits::field_type
T field_type
export the type representing the field
Definition ftraits.hh:28
Dune::FieldTraits::real_type
T real_type
export the type representing the real type of the field
Definition ftraits.hh:30
Dune::mutable_reference
get the 'mutable' version of a reference to a const object
Definition genericiterator.hh:116
Dune::RandomAccessIteratorFacade
Base class for stl conformant forward iterators.
Definition iteratorfacades.hh:435
Dune::DenseMatVecTraits
Definition matvectraits.hh:31
Dune::PromotionTraits
Compute type of the result of an arithmetic operation involving two different number types.
Definition promotiontraits.hh:27
Dune::type