Dune Core Modules (2.8.0)
densevector.hh
Go to the documentation of this file.
25 typedef typename FieldTraits< typename DenseMatVecTraits<V>::value_type >::field_type field_type;
130 friend class DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type >;
131 friend class DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type >;
133 typedef DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type, typename mutable_reference<R>::type > MutableIterator;
134 typedef DenseIterator<const typename std::remove_const<C>::type, const typename std::remove_const<T>::type, typename const_reference<R>::type > ConstIterator;
198 DifferenceType distanceTo(DenseIterator<const typename std::remove_const<C>::type,const typename std::remove_const<T>::type> other) const
201 return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
204 DifferenceType distanceTo(DenseIterator<typename std::remove_const<C>::type, typename std::remove_const<T>::type> other) const
207 return static_cast< DifferenceType >( other.position_ ) - static_cast< DifferenceType >( position_ );
263 };
592 typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType operator* (const DenseVector<Other>& x) const {
593 typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
610 typename PromotionTraits<field_type,typename DenseVector<Other>::field_type>::PromotedType dot(const DenseVector<Other>& x) const {
611 typedef typename PromotionTraits<field_type, typename DenseVector<Other>::field_type>::PromotedType PromotedType;
Macro for wrapping boundary checks.
Generic iterator class for dense vector and matrix implementations.
Definition: densevector.hh:129
std::ptrdiff_t DifferenceType
The type of the difference between two positions.
Definition: densevector.hh:140
C::size_type SizeType
The type to index the underlying container.
Definition: densevector.hh:145
Interface for a class of dense vectors over a given field.
Definition: densevector.hh:227
Traits::value_type value_type
export the type representing the field
Definition: densevector.hh:248
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:651
ConstIterator const_iterator
typedef for stl compliant access
Definition: densevector.hh:382
Iterator iterator
typedef for stl compliant access
Definition: densevector.hh:345
ConstIterator find(size_type i) const
return iterator to given element or end()
Definition: densevector.hh:411
value_type & front()
return reference to first element
Definition: densevector.hh:307
FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition: densevector.hh:642
bool operator==(const DenseVector< Other > &x) const
Binary vector comparison.
Definition: densevector.hh:556
DenseIterator< const DenseVector, const value_type > ConstIterator
ConstIterator class for sequential access.
Definition: densevector.hh:380
Traits::derived_type derived_type
type of derived vector class
Definition: densevector.hh:245
const value_type & front() const
return reference to first element
Definition: densevector.hh:313
derived_type operator+(const DenseVector< Other > &b) const
Binary vector addition.
Definition: densevector.hh:440
size_type dim() const
dimension of the vector space
Definition: densevector.hh:734
FieldTraits< vt >::real_type infinity_norm() const
infinity norm (maximum of absolute values of entries)
Definition: densevector.hh:662
derived_type & axpy(const field_type &a, const DenseVector< Other > &x)
vector space axpy operation ( *this += a x )
Definition: densevector.hh:576
derived_type & operator=(const value_type &k)
Assignment operator for scalar.
Definition: densevector.hh:267
Traits::size_type size_type
The type used for the index access and size operation.
Definition: densevector.hh:257
DenseIterator< DenseVector, value_type > Iterator
Iterator class for sequential access.
Definition: densevector.hh:343
derived_type & operator-=(const DenseVector< Other > &x)
vector space subtraction
Definition: densevector.hh:430
derived_type & operator+=(const DenseVector< Other > &x)
vector space addition
Definition: densevector.hh:420
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:524
bool operator!=(const DenseVector< Other > &x) const
Binary vector incomparison.
Definition: densevector.hh:568
const value_type & back() const
return reference to last element
Definition: densevector.hh:325
ConstIterator begin() const
begin ConstIterator
Definition: densevector.hh:385
PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType operator*(const DenseVector< Other > &x) const
indefinite vector dot product which corresponds to Petsc's VecTDot
Definition: densevector.hh:592
FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: densevector.hh:678
DenseVector & operator=(const DenseVector &)=default
Assignment operator for other DenseVector of same type.
Traits::value_type block_type
export the type representing the components
Definition: densevector.hh:254
value_type & operator[](size_type i)
random access
Definition: densevector.hh:296
@ blocklevel
The number of block levels we contain.
Definition: densevector.hh:262
FieldTraits< value_type >::field_type field_type
export the type representing the field
Definition: densevector.hh:251
value_type & back()
return reference to last element
Definition: densevector.hh:319
derived_type operator-() const
Vector negation.
Definition: densevector.hh:455
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:546
FieldTraits< value_type >::real_type one_norm_real() const
simplified one norm (uses Manhattan norm for complex values)
Definition: densevector.hh:633
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:610
Iterator find(size_type i)
return iterator to given element or end()
Definition: densevector.hh:374
FieldTraits< value_type >::real_type one_norm() const
one norm (sum over absolute values of entries)
Definition: densevector.hh:623
size_type N() const
number of blocks in the vector (are of size 1 here)
Definition: densevector.hh:728
bool empty() const
checks whether the container is empty
Definition: densevector.hh:331
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:432
Provides the functions dot(a,b) := and dotT(a,b) := .
Type traits to determine the type of reals (when working with complex numbers)
Implements a generic iterator class for writing stl conformant iterators.
auto dot(const A &a, const B &b) -> typename std::enable_if<!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
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:28
auto min(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::min()
Definition: defaults.hh:87
auto max(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::max()
Definition: defaults.hh:79
Documentation of the traits classes you need to write for each implementation of DenseVector or Dense...
STL namespace.
Compute type of the result of an arithmetic operation involving two different number types.
Compute type of the result of an arithmetic operation involving two different number types.
Definition: promotiontraits.hh:25
get the 'mutable' version of a reference to a const object
Definition: genericiterator.hh:114
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)