Parallel Analog Ensemble
Public Member Functions | List of all members
Array4D Class Referenceabstract

Array4D is an abstract class for 4-dimensional array. More...

#include <Array4D.h>

Inheritance diagram for Array4D:
Array4DPointer Forecasts ForecastsPointer ForecastsPointer

Public Member Functions

 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
 

Detailed Description

Array4D is an abstract class for 4-dimensional array.

Constructor & Destructor Documentation

◆ Array4D() [1/2]

Array4D::Array4D ( )
default

◆ Array4D() [2/2]

Array4D::Array4D ( const Array4D orig)
default

◆ ~Array4D()

virtual Array4D::~Array4D ( )
virtualdefault

Member Function Documentation

◆ 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_indexParameter index.
station_indexStation index.
time_indexTime index.
flt_indexFLT 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

Implemented in Array4DPointer.

◆ initialize()

virtual void Array4D::initialize ( double  )
pure virtual

Initialize the values

Parameters
Thevalue 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

Implemented in Forecasts, Array4DPointer, and ForecastsPointer.

◆ resize() [1/2]

virtual void Array4D::resize ( const Array4D )
pure virtual

Implemented in Array4DPointer.

◆ 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
Lengthof the first dimension
Lengthof the second dimension
Lengthof the third dimension
Lengthof 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

Implemented in Array4DPointer.

◆ shape()

virtual const std::size_t * Array4D::shape ( ) const
pure virtual

Implemented in Array4DPointer.

◆ 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

Implemented in Array4DPointer.


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