Loading...
Searching...
No Matches
dolfin::ArrayView< T > Class Template Reference

`#include <ArrayView.h>`

## Public Member Functions

| ArrayView ()
| Constructor.
| ArrayView (std::size_t N, T *x)
| Construct array from a pointer. Array does not take ownership.
template<typename V>
| ArrayView (V &v)
| ArrayView (const ArrayView &x)
| Copy constructor.
| ~ArrayView ()
| Destructor.
void | set (std::size_t N, T *x)
| Update object to point to new data.
template<typename V>
void | set (V &v)
| Update object to point to new container.
std::size_t | size () const
| Return size of array.
bool | empty () const
| Test if array view is empty.
const T & | operator[] (std::size_t i) const
| Access value of given entry (const version).
T & | operator[] (std::size_t i)
| Access value of given entry (non-const version).
T * | begin ()
| Pointer to start of array.
const T * | begin () const
| Pointer to start of array (const).
T * | end ()
| Pointer to beyond end of array.
const T * | end () const
| Pointer to beyond end of array (const).
const T * | data () const
| Return pointer to data (const version).
T * | data ()
| Return pointer to data (non-const version).

## Detailed Description

template<typename T>
class dolfin::ArrayView< T >

This class provides a wrapper for a pointer to an array. It never owns the data, and will not be valid if the underlying data goes out-of-scope.

## Constructor & Destructor Documentation

## ArrayView()

template<typename T>
template<typename V>

dolfin::ArrayView< T >::ArrayView | ( | V & | v | ) |

inline explicit

Construct array from a container with the the data() and size() functions

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

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/common/ArrayView.h