GammaLib 2.0.0
Loading...
Searching...
No Matches
GNdarray.cpp File Reference

N-dimensional array class implementation. More...

#include "GTools.hpp"
#include "GException.hpp"
#include "GNdarray.hpp"

Go to the source code of this file.

Macros

#define G_OP_ADD   "GNdarray::operator+=(GNdarray&)"
 
#define G_OP_SUB   "GNdarray::operator-=(GNdarray&)"
 
#define G_OP_MUL   "GNdarray::operator*=(GNdarray&)"
 
#define G_OP_DIV   "GNdarray::operator/=(GNdarray&)"
 
#define G_SHAPE   "GNdarray::shape(std::vector<int>&)"
 
#define G_AT1   "GNdarray::at(int&)"
 
#define G_AT2   "GNdarray::at(int&, int&)"
 
#define G_AT3   "GNdarray::at(int&, int&, int&)"
 
#define G_ATN   "GNdarray::at(std::vector<int>&)"
 

Functions

double min (const GNdarray &array)
 Computes minimum array element.
 
double max (const GNdarray &array)
 Computes maximum array element.
 
double sum (const GNdarray &array)
 Computes array sum.
 
GNdarray acos (const GNdarray &array)
 Computes arccos of array elements.
 
GNdarray acosh (const GNdarray &array)
 Computes acosh of array elements.
 
GNdarray asin (const GNdarray &array)
 Computes arcsin of array elements.
 
GNdarray asinh (const GNdarray &array)
 Computes asinh of array elements.
 
GNdarray atan (const GNdarray &array)
 Computes arctan of array elements.
 
GNdarray atanh (const GNdarray &array)
 Computes atanh of array elements.
 
GNdarray cos (const GNdarray &array)
 Computes cosine of array elements.
 
GNdarray cosh (const GNdarray &array)
 Computes cosh of array elements.
 
GNdarray exp (const GNdarray &array)
 Computes exponential of array elements.
 
GNdarray abs (const GNdarray &array)
 Computes absolute of array elements.
 
GNdarray log (const GNdarray &array)
 Computes natural logarithm of array elements.
 
GNdarray sign (const GNdarray &array)
 Computes sign of array elements.
 
GNdarray log10 (const GNdarray &array)
 Computes base10 logarithm of array elements.
 
GNdarray sin (const GNdarray &array)
 Computes sine of array elements.
 
GNdarray sinh (const GNdarray &array)
 Computes sinh of array elements.
 
GNdarray sqrt (const GNdarray &array)
 Computes square root of array elements.
 
GNdarray tan (const GNdarray &array)
 Computes tangens of array elements.
 
GNdarray tanh (const GNdarray &array)
 Computes tanh of array elements.
 
GNdarray pow (const GNdarray &array, const double &power)
 Computes tanh of array elements.
 

Detailed Description

N-dimensional array class implementation.

Author
Juergen Knoedlseder

Definition in file GNdarray.cpp.

Macro Definition Documentation

◆ G_AT1

#define G_AT1   "GNdarray::at(int&)"

Definition at line 42 of file GNdarray.cpp.

◆ G_AT2

#define G_AT2   "GNdarray::at(int&, int&)"

Definition at line 43 of file GNdarray.cpp.

◆ G_AT3

#define G_AT3   "GNdarray::at(int&, int&, int&)"

Definition at line 44 of file GNdarray.cpp.

Referenced by GNdarray::at().

◆ G_ATN

#define G_ATN   "GNdarray::at(std::vector<int>&)"

Definition at line 45 of file GNdarray.cpp.

Referenced by GNdarray::at().

◆ G_OP_ADD

#define G_OP_ADD   "GNdarray::operator+=(GNdarray&)"

Definition at line 37 of file GNdarray.cpp.

◆ G_OP_DIV

#define G_OP_DIV   "GNdarray::operator/=(GNdarray&)"

Definition at line 40 of file GNdarray.cpp.

◆ G_OP_MUL

#define G_OP_MUL   "GNdarray::operator*=(GNdarray&)"

Definition at line 39 of file GNdarray.cpp.

◆ G_OP_SUB

#define G_OP_SUB   "GNdarray::operator-=(GNdarray&)"

Definition at line 38 of file GNdarray.cpp.

◆ G_SHAPE

#define G_SHAPE   "GNdarray::shape(std::vector<int>&)"

Definition at line 41 of file GNdarray.cpp.

Referenced by GNdarray::shape(), and GSkyMap::shape().

Function Documentation

◆ abs()

GNdarray abs ( const GNdarray & array)

Computes absolute of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the absolute of every element.

Definition at line 1196 of file GNdarray.cpp.

◆ acos()

GNdarray acos ( const GNdarray & array)

Computes arccos of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the arccos of every element.

Definition at line 1007 of file GNdarray.cpp.

◆ acosh()

GNdarray acosh ( const GNdarray & array)

Computes acosh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the acosh of every element.

Definition at line 1028 of file GNdarray.cpp.

◆ asin()

GNdarray asin ( const GNdarray & array)

Computes arcsin of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the arcsin of every element.

Definition at line 1049 of file GNdarray.cpp.

◆ asinh()

GNdarray asinh ( const GNdarray & array)

Computes asinh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the asinh of every element.

Definition at line 1070 of file GNdarray.cpp.

◆ atan()

GNdarray atan ( const GNdarray & array)

Computes arctan of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the arctan of every element.

Definition at line 1091 of file GNdarray.cpp.

◆ atanh()

GNdarray atanh ( const GNdarray & array)

Computes atanh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the atanh of every element.

Definition at line 1112 of file GNdarray.cpp.

◆ cos()

GNdarray cos ( const GNdarray & array)

Computes cosine of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the cosine of every element.

Definition at line 1133 of file GNdarray.cpp.

◆ cosh()

GNdarray cosh ( const GNdarray & array)

Computes cosh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the cosh of every element.

Definition at line 1154 of file GNdarray.cpp.

◆ exp()

GNdarray exp ( const GNdarray & array)

Computes exponential of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the exponential of every element.

Definition at line 1175 of file GNdarray.cpp.

◆ log()

GNdarray log ( const GNdarray & array)

Computes natural logarithm of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the natural logarithm of every element.

Definition at line 1217 of file GNdarray.cpp.

◆ log10()

GNdarray log10 ( const GNdarray & array)

Computes base10 logarithm of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the base10 logarithm of every element.

Definition at line 1279 of file GNdarray.cpp.

◆ max()

double max ( const GNdarray & array)

Computes maximum array element.

Parameters
[in]arrayArray.
Returns
Maximum array element.

Definition at line 959 of file GNdarray.cpp.

◆ min()

double min ( const GNdarray & array)

Computes minimum array element.

Parameters
[in]arrayArray.
Returns
Minimum array element.

Definition at line 930 of file GNdarray.cpp.

◆ pow()

GNdarray pow ( const GNdarray & array,
const double & power )

Computes tanh of array elements.

Parameters
[in]arrayArray.
[in]powerPower.
Returns
Array containing the power of every element.

Definition at line 1406 of file GNdarray.cpp.

◆ sign()

GNdarray sign ( const GNdarray & array)

Computes sign of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the sign of every element.

Definition at line 1238 of file GNdarray.cpp.

Referenced by GFft::factor2(), GFft::factor3(), GFft::factor4(), GFft::factor5(), GFft::factor6(), GFft::factor7(), GFft::factorn(), GFft::get_w(), and GFft::transform().

◆ sin()

GNdarray sin ( const GNdarray & array)

Computes sine of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the sine of every element.

Definition at line 1300 of file GNdarray.cpp.

◆ sinh()

GNdarray sinh ( const GNdarray & array)

Computes sinh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the sinh of every element.

Definition at line 1321 of file GNdarray.cpp.

◆ sqrt()

GNdarray sqrt ( const GNdarray & array)

Computes square root of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the square root of every element.

Definition at line 1342 of file GNdarray.cpp.

◆ sum()

double sum ( const GNdarray & array)

Computes array sum.

Parameters
[in]arrayArray.
Returns
Sum of array elements.

Definition at line 988 of file GNdarray.cpp.

◆ tan()

GNdarray tan ( const GNdarray & array)

Computes tangens of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the tangens of every element.

Definition at line 1363 of file GNdarray.cpp.

◆ tanh()

GNdarray tanh ( const GNdarray & array)

Computes tanh of array elements.

Parameters
[in]arrayArray.
Returns
Array containing the tanh of every element.

Definition at line 1384 of file GNdarray.cpp.