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

`#include <Array.h>`

## Public Member Functions

| Array (std::size_t N)
| Create array of size N. Array has ownership.
| Array (std::size_t N, T *x)
| Construct array from a pointer. Array does not take ownership.
| ~Array ()
| Destructor.
std::string | str (bool verbose) const
std::size_t | size () const
| Return size of array.
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).
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::Array< T >

This class provides a simple wrapper for a pointer to an array. A purpose of this class is to enable the simple and safe exchange of data between C++ and Python.

## Member Function Documentation

## str()

template<typename T>

std::string dolfin::Array< T >::str | ( | bool | verbose | ) | const

inline

Return informal string representation (pretty-print). Note that the Array class is not a subclass of Variable (for efficiency) which means that one needs to call str() directly instead of using the info() function on Array objects.

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

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