|
| | Array (const std::array< int, D > &dimensions, const std::array< int, D > &offsets={0}) |
| | Constructs an Array object with the specified dimensions and offsets.
|
| |
| | Array (const Decomposition &decomp) |
| | Constructs an Array object from Decomposition object. Array dimension and offset depends from the type T of array. If the type of array is double, i.e. T = double, then inbox_size and inbox_offset is used. If the type of array is complex, i.e. T = std::complex<double>, then outbox_size and oubox_offset is used.
|
| |
|
std::vector< T >::iterator | begin () |
| |
|
std::vector< T >::iterator | end () |
| |
|
std::vector< T >::const_iterator | begin () const |
| |
|
std::vector< T >::const_iterator | end () const |
| |
| const MultiIndex< D > & | get_index () const |
| | Get the index object.
|
| |
| std::vector< T > & | get_data () |
| | Get the data object.
|
| |
|
T & | operator[] (const std::array< int, D > &indices) |
| |
|
T & | operator[] (int idx) |
| |
|
T & | operator() (const std::array< int, D > &indices) |
| |
| std::array< int, D > | get_size () const |
| | Get the size object.
|
| |
| std::array< int, D > | get_offset () const |
| | Get the offset object.
|
| |
| bool | inbounds (const std::array< int, D > &indices) |
| | Checks if the specified indices are in bounds.
|
| |
| template<typename Func > |
| void | apply (Func &&func) |
| | Applies the specified function to each element of the array.
|
| |
| | operator std::vector< T > & () |
| | Convert Array<T, D> to std::vector<T>.
|
| |
|
void | set_data (const std::vector< T > &new_data) |
| |
|
| std::ostream & | operator<< (std::ostream &os, const Array< T, D > &array) |
| | Outputs the array to the specified output stream.
|
| |
◆ Array() [1/2]
Constructs an Array object with the specified dimensions and offsets.
- Parameters
-
| dimensions | The dimensions of the array. |
| offsets | The offsets of the array. |
◆ Array() [2/2]
Constructs an Array object from Decomposition object. Array dimension and offset depends from the type T of array. If the type of array is double, i.e. T = double, then inbox_size and inbox_offset is used. If the type of array is complex, i.e. T = std::complex<double>, then outbox_size and oubox_offset is used.
- Parameters
-
| decomp | The Decomposition object. |
◆ apply()
Applies the specified function to each element of the array.
- Template Parameters
-
- Parameters
-
| func | A function that takes std::array<int, D> as an argument and returns a type convertible to T. |
◆ get_data()
| std::vector< T > & pfc::Array< T, D >::get_data |
( |
| ) |
|
|
inline |
Get the data object.
- Returns
- std::vector<T>&
◆ get_index()
Get the index object.
- Returns
- const MultiIndex<D>&
◆ get_offset()
Get the offset object.
- Returns
- std::array<int, D>
◆ get_size()
Get the size object.
- Returns
- std::array<int, D>
◆ inbounds()
Checks if the specified indices are in bounds.
- Parameters
-
| indices | The indices to check. |
- Returns
- true
-
false
◆ operator std::vector< T > &()
| pfc::Array< T, D >::operator std::vector< T > & |
( |
| ) |
|
|
inline |
Convert Array<T, D> to std::vector<T>.
- Returns
- A reference to underlying data.
◆ operator<<
Outputs the array to the specified output stream.
- Parameters
-
| os | The output stream. |
| array | The array to output. |
- Returns
- Reference to the output stream.
The documentation for this class was generated from the following file: