dune-common  2.6-git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Related Functions | List of all members
Dune::FieldVector< K, SIZE > Class Template Reference

vector space out of a tensor product of fields. More...

#include <dune/common/densematrix.hh>

Inheritance diagram for Dune::FieldVector< K, SIZE >:
Inheritance graph

Public Types

enum  { dimension = SIZE }
 export size More...
 
typedef Base::size_type size_type
 
typedef Base::value_type value_type
 
typedef value_typereference
 The type used for references to the vector entry. More...
 

Public Member Functions

constexpr FieldVector ()
 Constructor making default-initialized vector. More...
 
 FieldVector (const K &t)
 Constructor making vector with identical coordinates. More...
 
 FieldVector (const FieldVector &x)
 Copy constructor. More...
 
 FieldVector (std::initializer_list< K > const &l)
 Construct from a std::initializer_list. More...
 
template<class C >
 FieldVector (const DenseVector< C > &x, typename std::enable_if< IsFieldVectorSizeCorrect< C, SIZE >::value >::type *dummy=0)
 Copy constructor from a second vector of possibly different type. More...
 
template<class K1 , int SIZE1>
 FieldVector (const FieldVector< K1, SIZE1 > &x)
 Constructor making vector with identical coordinates. More...
 
K & operator[] (size_type i)
 
const K & operator[] (size_type i) const
 
derived_type & operator= (const value_type &k)
 Assignment operator for scalar. More...
 

Static Public Member Functions

static constexpr size_type size ()
 

Public Attributes

const typedef value_typeconst_reference
 The type used for const references to the vector entry. More...
 

Related Functions

(Note that these are not member functions.)

template<class K , int SIZE>
std::istream & operator>> (std::istream &in, FieldVector< K, SIZE > &v)
 Read a FieldVector from an input stream. More...
 

Detailed Description

template<class K, int SIZE>
class Dune::FieldVector< K, SIZE >

vector space out of a tensor product of fields.

Template Parameters
Kthe field type (use float, double, complex, etc)
SIZEnumber of components.

Member Typedef Documentation

◆ reference

template<class K , int SIZE>
typedef value_type& Dune::FieldVector< K, SIZE >::reference

The type used for references to the vector entry.

◆ size_type

template<class K , int SIZE>
typedef Base::size_type Dune::FieldVector< K, SIZE >::size_type

◆ value_type

template<class K , int SIZE>
typedef Base::value_type Dune::FieldVector< K, SIZE >::value_type

Member Enumeration Documentation

◆ anonymous enum

template<class K , int SIZE>
anonymous enum

export size

Enumerator
dimension 

The size of this vector.

Constructor & Destructor Documentation

◆ FieldVector() [1/6]

template<class K , int SIZE>
constexpr Dune::FieldVector< K, SIZE >::FieldVector ( )
inlineconstexpr

Constructor making default-initialized vector.

◆ FieldVector() [2/6]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const K &  t)
inlineexplicit

Constructor making vector with identical coordinates.

◆ FieldVector() [3/6]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< K, SIZE > &  x)
inline

Copy constructor.

◆ FieldVector() [4/6]

template<class K , int SIZE>
Dune::FieldVector< K, SIZE >::FieldVector ( std::initializer_list< K > const &  l)
inline

Construct from a std::initializer_list.

◆ FieldVector() [5/6]

template<class K , int SIZE>
template<class C >
Dune::FieldVector< K, SIZE >::FieldVector ( const DenseVector< C > &  x,
typename std::enable_if< IsFieldVectorSizeCorrect< C, SIZE >::value >::type *  dummy = 0 
)
inline

Copy constructor from a second vector of possibly different type.

If the DenseVector type of the this constructor's argument is implemented by a FieldVector, it is statically checked if it has the correct size. If this is not the case the constructor is removed from the overload set using SFINAE.

Parameters
[in]xA DenseVector with correct size.
[in]dummyA void* dummy argument needed by SFINAE.

◆ FieldVector() [6/6]

template<class K , int SIZE>
template<class K1 , int SIZE1>
Dune::FieldVector< K, SIZE >::FieldVector ( const FieldVector< K1, SIZE1 > &  x)
inlineexplicit

Constructor making vector with identical coordinates.

Member Function Documentation

◆ operator=()

template<class K , int SIZE>
derived_type& Dune::DenseVector< V >::operator=
inline

Assignment operator for scalar.

◆ operator[]() [1/2]

template<class K , int SIZE>
K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i)
inline

◆ operator[]() [2/2]

template<class K , int SIZE>
const K& Dune::FieldVector< K, SIZE >::operator[] ( size_type  i) const
inline

◆ size()

template<class K , int SIZE>
static constexpr size_type Dune::FieldVector< K, SIZE >::size ( )
inlinestaticconstexpr

Member Data Documentation

◆ const_reference

template<class K , int SIZE>
const typedef value_type& Dune::FieldVector< K, SIZE >::const_reference

The type used for const references to the vector entry.


The documentation for this class was generated from the following files: