Array4D is an abstract class for 4-dimensional array.
More...
#include <Array4D.h>
|
| Array4D ()=default |
|
| Array4D (const Array4D &orig)=default |
|
virtual | ~Array4D ()=default |
|
virtual const std::size_t * | shape () const =0 |
|
virtual std::size_t | num_elements () const =0 |
|
virtual const double * | getValuesPtr () const =0 |
|
virtual double * | getValuesPtr ()=0 |
|
virtual void | resize (std::size_t, std::size_t, std::size_t, std::size_t)=0 |
|
virtual void | resize (const Array4D &)=0 |
|
virtual void | initialize (double)=0 |
|
virtual double | getValue (std::size_t, std::size_t, std::size_t, std::size_t) const =0 |
|
virtual void | setValue (double val, std::size_t, std::size_t, std::size_t, std::size_t)=0 |
|
virtual void | subset (const std::vector< std::size_t > &, const std::vector< std::size_t > &, const std::vector< std::size_t > &, const std::vector< std::size_t > &, Array4D &) const =0 |
|
virtual void | print (std::ostream &) const =0 |
|
Array4D is an abstract class for 4-dimensional array.
◆ Array4D() [1/2]
◆ Array4D() [2/2]
Array4D::Array4D |
( |
const Array4D & |
orig | ) |
|
|
default |
◆ ~Array4D()
virtual Array4D::~Array4D |
( |
| ) |
|
|
virtualdefault |
◆ getValue()
virtual double Array4D::getValue |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| const |
|
pure virtual |
Gets or sets a value using the array indices.
- Parameters
-
parameter_index | Parameter index. |
station_index | Station index. |
time_index | Time index. |
flt_index | FLT index. |
- Returns
- A value.
Implemented in Array4DPointer.
◆ getValuesPtr() [1/2]
virtual const double * Array4D::getValuesPtr |
( |
| ) |
const |
|
pure virtual |
Gets a double pointer to the start of the values.
- Returns
- A double pointer.
Implemented in Array4DPointer.
◆ getValuesPtr() [2/2]
virtual double * Array4D::getValuesPtr |
( |
| ) |
|
|
pure virtual |
◆ initialize()
virtual void Array4D::initialize |
( |
double |
| ) |
|
|
pure virtual |
Initialize the values
- Parameters
-
The | value for initialization |
Implemented in Array4DPointer.
◆ num_elements()
virtual std::size_t Array4D::num_elements |
( |
| ) |
const |
|
pure virtual |
Returns the total number of data values.
- Returns
- A value.
Implemented in Array4DPointer.
◆ print()
virtual void Array4D::print |
( |
std::ostream & |
| ) |
const |
|
pure virtual |
◆ resize() [1/2]
virtual void Array4D::resize |
( |
const Array4D & |
| ) |
|
|
pure virtual |
◆ resize() [2/2]
virtual void Array4D::resize |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| |
|
pure virtual |
Resize the dimensions and allocate memory.
- Parameters
-
Length | of the first dimension |
Length | of the second dimension |
Length | of the third dimension |
Length | of the fourth dimension |
Implemented in Array4DPointer.
◆ setValue()
virtual void Array4D::setValue |
( |
double |
val, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| |
|
pure virtual |
◆ shape()
virtual const std::size_t * Array4D::shape |
( |
| ) |
const |
|
pure virtual |
◆ subset()
virtual void Array4D::subset |
( |
const std::vector< std::size_t > & |
, |
|
|
const std::vector< std::size_t > & |
, |
|
|
const std::vector< std::size_t > & |
, |
|
|
const std::vector< std::size_t > & |
, |
|
|
Array4D & |
|
|
) |
| const |
|
pure virtual |
The documentation for this class was generated from the following file:
- /Users/weiming/github/AnalogsEnsemble/CAnEn/include/Array4D.h