GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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. More...
 
double max (const GNdarray &array)
 Computes maximum array element. More...
 
double sum (const GNdarray &array)
 Computes array sum. More...
 
GNdarray acos (const GNdarray &array)
 Computes arccos of array elements. More...
 
GNdarray acosh (const GNdarray &array)
 Computes acosh of array elements. More...
 
GNdarray asin (const GNdarray &array)
 Computes arcsin of array elements. More...
 
GNdarray asinh (const GNdarray &array)
 Computes asinh of array elements. More...
 
GNdarray atan (const GNdarray &array)
 Computes arctan of array elements. More...
 
GNdarray atanh (const GNdarray &array)
 Computes atanh of array elements. More...
 
GNdarray cos (const GNdarray &array)
 Computes cosine of array elements. More...
 
GNdarray cosh (const GNdarray &array)
 Computes cosh of array elements. More...
 
GNdarray exp (const GNdarray &array)
 Computes exponential of array elements. More...
 
GNdarray abs (const GNdarray &array)
 Computes absolute of array elements. More...
 
GNdarray log (const GNdarray &array)
 Computes natural logarithm of array elements. More...
 
GNdarray sign (const GNdarray &array)
 Computes sign of array elements. More...
 
GNdarray log10 (const GNdarray &array)
 Computes base10 logarithm of array elements. More...
 
GNdarray sin (const GNdarray &array)
 Computes sine of array elements. More...
 
GNdarray sinh (const GNdarray &array)
 Computes sinh of array elements. More...
 
GNdarray sqrt (const GNdarray &array)
 Computes square root of array elements. More...
 
GNdarray tan (const GNdarray &array)
 Computes tangens of array elements. More...
 
GNdarray tanh (const GNdarray &array)
 Computes tanh of array elements. More...
 
GNdarray pow (const GNdarray &array, const double &power)
 Computes tanh of array elements. More...
 

Detailed Description

N-dimensional array class implementation.

Author
Juergen Knoedlseder

Definition in file GNdarray.cpp.

Macro Definition Documentation

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

Definition at line 42 of file GNdarray.cpp.

Referenced by GNdarray::at().

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

Definition at line 43 of file GNdarray.cpp.

Referenced by GNdarray::at().

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

Definition at line 44 of file GNdarray.cpp.

Referenced by GNdarray::at().

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

Definition at line 45 of file GNdarray.cpp.

Referenced by GNdarray::at().

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

Definition at line 37 of file GNdarray.cpp.

Referenced by GNdarray::operator+=().

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

Definition at line 40 of file GNdarray.cpp.

Referenced by GNdarray::operator/=().

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

Definition at line 39 of file GNdarray.cpp.

Referenced by GNdarray::operator*=().

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

Definition at line 38 of file GNdarray.cpp.

Referenced by GNdarray::operator-=().

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

Definition at line 41 of file GNdarray.cpp.

Referenced by GNdarray::shape().

Function Documentation

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.

References abs(), and GNdarray::m_data.

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.

References gammalib::acos(), and GNdarray::m_data.

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.

References acosh(), and GNdarray::m_data.

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.

References asin(), and GNdarray::m_data.

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.

References asinh(), and GNdarray::m_data.

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.

References atan(), and GNdarray::m_data.

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.

References atanh(), and GNdarray::m_data.

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.

References cos(), and GNdarray::m_data.

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.

References cosh(), and GNdarray::m_data.

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.

References exp(), and GNdarray::m_data.

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.

References log(), and GNdarray::m_data.

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.

References log10(), and GNdarray::m_data.

double max ( const GNdarray array)

Computes maximum array element.

Parameters
[in]arrayArray.
Returns
Maximum array element.

Definition at line 959 of file GNdarray.cpp.

References GNdarray::m_data.

double min ( const GNdarray array)

Computes minimum array element.

Parameters
[in]arrayArray.
Returns
Minimum array element.

Definition at line 930 of file GNdarray.cpp.

References GNdarray::m_data.

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.

References GNdarray::m_data, and pow().

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.

References GNdarray::m_data.

Referenced by GFft::transform().

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.

References GNdarray::m_data, and sin().

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.

References GNdarray::m_data, and sinh().

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.

References GNdarray::m_data, and sqrt().

double sum ( const GNdarray array)

Computes array sum.

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

Definition at line 988 of file GNdarray.cpp.

References GNdarray::m_data.

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.

References GNdarray::m_data, and tan().

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.

References GNdarray::m_data, and tanh().