Array4DPointer is an implementation of the abstract class Array4D.
More...
#include <Array4DPointer.h>
|
| Array4DPointer () |
|
| Array4DPointer (const Array4DPointer &orig) |
|
| Array4DPointer (std::size_t, std::size_t, std::size_t, std::size_t) |
|
virtual | ~Array4DPointer () |
|
virtual const std::size_t * | shape () const override |
|
virtual std::size_t | num_elements () const override |
|
virtual const double * | getValuesPtr () const override |
|
virtual double * | getValuesPtr () override |
|
virtual void | resize (std::size_t, std::size_t, std::size_t, std::size_t) override |
|
virtual void | resize (const Array4D &) override |
|
virtual void | initialize (double value) override |
|
virtual double | getValue (std::size_t, std::size_t, std::size_t, std::size_t) const override |
|
virtual void | setValue (double val, std::size_t, std::size_t, std::size_t, std::size_t) override |
|
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 override |
|
virtual void | print (std::ostream &) const override |
|
Array4DPointer & | operator= (const Array4DPointer &) |
|
bool | operator== (const Array4DPointer &) const |
|
| Array4D ()=default |
|
| Array4D (const Array4D &orig)=default |
|
virtual | ~Array4D ()=default |
|
Array4DPointer is an implementation of the abstract class Array4D.
◆ Array4DPointer() [1/3]
Array4DPointer::Array4DPointer |
( |
| ) |
|
◆ Array4DPointer() [2/3]
◆ Array4DPointer() [3/3]
Array4DPointer::Array4DPointer |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| |
◆ ~Array4DPointer()
Array4DPointer::~Array4DPointer |
( |
| ) |
|
|
virtual |
◆ allocateMemory_()
void Array4DPointer::allocateMemory_ |
( |
| ) |
|
|
protected |
◆ getValue()
double Array4DPointer::getValue |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| const |
|
overridevirtual |
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.
Implements Array4D.
◆ getValuesPtr() [1/2]
const double * Array4DPointer::getValuesPtr |
( |
| ) |
const |
|
overridevirtual |
Gets a double pointer to the start of the values.
- Returns
- A double pointer.
Implements Array4D.
◆ getValuesPtr() [2/2]
double * Array4DPointer::getValuesPtr |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
void Array4DPointer::initialize |
( |
double |
| ) |
|
|
overridevirtual |
Initialize the values
- Parameters
-
The | value for initialization |
Implements Array4D.
◆ num_elements()
size_t Array4DPointer::num_elements |
( |
| ) |
const |
|
overridevirtual |
Returns the total number of data values.
- Returns
- A value.
Implements Array4D.
◆ operator=()
◆ operator==()
◆ print()
void Array4DPointer::print |
( |
std::ostream & |
| ) |
const |
|
overridevirtual |
◆ resize() [1/2]
void Array4DPointer::resize |
( |
const Array4D & |
arr | ) |
|
|
overridevirtual |
◆ resize() [2/2]
virtual void Array4DPointer::resize |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| |
|
overridevirtual |
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 |
Implements Array4D.
◆ setValue()
void Array4DPointer::setValue |
( |
double |
val, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| |
|
overridevirtual |
◆ shape()
const size_t * Array4DPointer::shape |
( |
| ) |
const |
|
overridevirtual |
◆ subset()
void Array4DPointer::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 |
|
overridevirtual |
◆ toIndex_()
size_t Array4DPointer::toIndex_ |
( |
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
, |
|
|
std::size_t |
|
|
) |
| const |
|
protected |
◆ operator<<
◆ _DEFAULT_VALUE
const double Array4DPointer::_DEFAULT_VALUE = NAN |
|
static |
◆ allocated_
bool Array4DPointer::allocated_ |
|
protected |
This variable is used to keep track of whether the data memory is allocated internally and whether the pointer should be deleted during the de-constructor.
◆ data_
double* Array4DPointer::data_ |
|
protected |
◆ dims_
The documentation for this class was generated from the following files: