Reference documentation for deal.II version 9.2.0
|
#include <deal.II/base/vector_slice.h>
Public Member Functions | |
VectorSlice (VectorType &v) | |
VectorSlice (VectorType &v, unsigned int start, unsigned int length) | |
Public Member Functions inherited from ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | |
ArrayView () | |
ArrayView (value_type *starting_element, const std::size_t n_elements) | |
ArrayView (const ArrayView< typename std::remove_cv< value_type >::type, MemorySpace::Host > &view) | |
ArrayView (value_type &element) | |
ArrayView (const std::vector< typename std::remove_cv< value_type >::type > &vector) | |
ArrayView (std::vector< typename std::remove_cv< value_type >::type > &vector) | |
void | reinit (value_type *starting_element, const std::size_t n_elements) |
bool | operator== (const ArrayView< const value_type, MemorySpace::Host > &other_view) const |
bool | operator== (const ArrayView< typename std::remove_cv< value_type >::type, MemorySpace::Host > &other_view) const |
bool | operator!= (const ArrayView< const value_type, MemorySpace::Host > &other_view) const |
bool | operator!= (const ArrayView< typename std::remove_cv< value_type >::type, MemorySpace::Host > &other_view) const |
std::size_t | size () const |
value_type * | data () const noexcept |
iterator | begin () const |
iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
value_type & | operator[] (const std::size_t i) const |
Protected Types | |
using | ArrayViewType = ArrayView< typename std::conditional< std::is_const< VectorType >::value, const typename VectorType::value_type, typename VectorType::value_type >::type > |
Related Functions | |
(Note that these are not member functions.) | |
template<typename VectorType > | |
const VectorSlice< const VectorType > | make_slice (VectorType &v) |
template<typename VectorType > | |
const VectorSlice< const VectorType > | make_slice (VectorType &v, const unsigned int start, const unsigned int length) |
Related Functions inherited from ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | |
ArrayView< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type, MemorySpace::Host > | make_array_view (const Iterator begin, const Iterator end) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type, MemorySpace::Host > | make_array_view (std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type *const begin, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type *const end) |
ArrayView< const Number, MemorySpace::Host > | make_array_view (const ArrayView< Number, MemorySpace::Host > &array_view) |
ArrayView< Number, MemorySpace::Host > | make_array_view (ArrayView< Number, MemorySpace::Host > &array_view) |
ArrayView< const Number > | make_array_view (const Tensor< rank, dim, Number > &tensor) |
ArrayView< Number > | make_array_view (Tensor< rank, dim, Number > &tensor) |
ArrayView< const Number > | make_array_view (const SymmetricTensor< rank, dim, Number > &tensor) |
ArrayView< Number > | make_array_view (SymmetricTensor< rank, dim, Number > &tensor) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type(&array)[N]) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (Vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const Vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (std::vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const std::vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (std::vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector, const std::size_t starting_index, const std::size_t size_of_view) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const std::vector< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &vector, const std::size_t starting_index, const std::size_t size_of_view) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type row) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (LAPACKFullMatrix< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &matrix) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const LAPACKFullMatrix< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &matrix) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type row) |
ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type row, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type starting_column, const std::size_t size_of_view) |
ArrayView< const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | make_array_view (const Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > &table, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type row, const typename Table< 2, std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type >::size_type starting_column, const std::size_t size_of_view) |
Additional Inherited Members | |
Public Types inherited from ArrayView< std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type > | |
using | value_type = std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type |
using | iterator = value_type * |
using | const_iterator = const std::conditional< std::is_const< VectorType >::value, const VectorType::value_type, VectorType::value_type >::type * |
Filter a range out of any object having a random access operator[] (unsigned int)
and a function size() const
.
The use of this object is straightforward. It duplicates the random access operator of the VectorType
and adds an offset to every index.
Some precautions have to be taken if it is used for a constant vector: the VectorSlice object has to be constant, too. The appropriate initialization sequence is like this:
Definition at line 51 of file vector_slice.h.
|
protected |
Alias for the base class name.
Definition at line 78 of file vector_slice.h.
|
inline |
Construct a vector slice containing the whole vector. Comes handy, if you did not want to have a slice at all, but the function you call wants it: just put in the vector itself as argument and let this constructor make a slice for you.
Definition at line 119 of file vector_slice.h.
|
inline |
The real constructor for a vector slice, allowing you to specify the start index and the length of the slice.
Definition at line 126 of file vector_slice.h.
|
related |
Helper function for creating temporary objects without typing template arguments.
Definition at line 91 of file vector_slice.h.
|
related |
Helper function for creating temporary objects without typing template arguments.
Definition at line 108 of file vector_slice.h.