GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GNdarray.hpp File Reference

N-dimensional array class interface definition. More...

#include <string>
#include <vector>
#include "GBase.hpp"

Go to the source code of this file.

Classes

class  GNdarray
 N-dimensional array class. More...
 

Functions

GNdarray operator+ (const GNdarray &a, const GNdarray &b)
 Return sum of two arrays. More...
 
GNdarray operator+ (const GNdarray &array, const double &value)
 Add value to array (right addition) More...
 
GNdarray operator+ (const double &value, const GNdarray &array)
 Add value to array (left addition) More...
 
GNdarray operator- (const GNdarray &a, const GNdarray &b)
 Return difference of arrays. More...
 
GNdarray operator- (const GNdarray &array, const double &value)
 Subtract value from array. More...
 
GNdarray operator- (const double &value, const GNdarray &array)
 Subtract array from value. More...
 
GNdarray operator* (const GNdarray &array, const double &value)
 Multiply array by value (right multiplication) More...
 
GNdarray operator* (const double &value, const GNdarray &array)
 Multiply array by value (left multiplication) More...
 
GNdarray operator/ (const GNdarray &array, const double &value)
 Divide array by value. More...
 

Detailed Description

N-dimensional array class interface definition.

Author
Juergen Knoedlseder

Definition in file GNdarray.hpp.

Function Documentation

GNdarray operator* ( const GNdarray array,
const double &  value 
)
inline

Multiply array by value (right multiplication)

Parameters
[in]arrayArray.
[in]valueValue.
Returns
Array for which all elements have be multiplied by value.

Returns an array for which all elements have be multiplied by value.

Definition at line 532 of file GNdarray.hpp.

GNdarray operator* ( const double &  value,
const GNdarray array 
)
inline

Multiply array by value (left multiplication)

Parameters
[in]valueValue.
[in]arrayArray.
Returns
Array for which all elements have be multiplied by value.

Returns an array for which all elements have be multiplied by value.

Definition at line 550 of file GNdarray.hpp.

GNdarray operator+ ( const GNdarray a,
const GNdarray b 
)
inline

Return sum of two arrays.

Parameters
[in]aFirst array.
[in]bSecond array.
Returns
Sum of arrays a and b.

Returns the sum of arrays a and b.

Definition at line 416 of file GNdarray.hpp.

GNdarray operator+ ( const GNdarray array,
const double &  value 
)
inline

Add value to array (right addition)

Parameters
[in]arrayArray.
[in]valueValue.
Returns
Array with value added to all elements.

Returns an array for which the value has been added to all elements.

Definition at line 434 of file GNdarray.hpp.

GNdarray operator+ ( const double &  value,
const GNdarray array 
)
inline

Add value to array (left addition)

Parameters
[in]valueValue.
[in]arrayArray.
Returns
Array with value added to all elements.

Returns an array for which the value has been added to all elements.

Definition at line 452 of file GNdarray.hpp.

GNdarray operator- ( const GNdarray a,
const GNdarray b 
)
inline

Return difference of arrays.

Parameters
[in]aFirst array.
[in]bSecond array.
Returns
Difference between array a and b.

Returns the difference between array a and b.

Definition at line 470 of file GNdarray.hpp.

GNdarray operator- ( const GNdarray array,
const double &  value 
)
inline

Subtract value from array.

Parameters
[in]arrayArray.
[in]valueValue.
Returns
Array with value subtracted from all elements.

Returns an array for which the value has been subtracted from all elements. For example

double   value  = 5.0;
GNdarray result = array - value;

Definition at line 492 of file GNdarray.hpp.

GNdarray operator- ( const double &  value,
const GNdarray array 
)
inline

Subtract array from value.

Parameters
[in]valueValue.
[in]arrayArray.
Returns
Array with value subtracted from all elements.

Returns an array for which all elements have been subtracted from value. For example

double   value  = 5.0;
GNdarray result = value - array;

Definition at line 514 of file GNdarray.hpp.

GNdarray operator/ ( const GNdarray array,
const double &  value 
)
inline

Divide array by value.

Parameters
[in]arrayArray.
[in]valueValue.
Returns
Array for which all elements have be divided by value.

Returns an array for which all elements have be divided by value.

Definition at line 568 of file GNdarray.hpp.