GammaLib  2.1.0.dev
 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 533 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 551 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 417 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 435 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 453 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 471 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 493 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 515 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 569 of file GNdarray.hpp.