GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GVector.hpp File Reference

Vector class interface definition. More...

#include <cmath>
#include <string>
#include "GBase.hpp"
#include "GException.hpp"

Go to the source code of this file.

Classes

class  GVector
 Vector class. More...
 

Functions

GVector operator+ (const GVector &a, const GVector &b)
 Add two vectors. More...
 
GVector operator+ (const GVector &vector, const double &scalar)
 Add scalar to vector. More...
 
GVector operator+ (const double &scalar, const GVector &vector)
 Add scalar to vector. More...
 
GVector operator- (const GVector &a, const GVector &b)
 Subtract vector from vector. More...
 
GVector operator- (const GVector &vector, const double &scalar)
 Subtract scalar from vector. More...
 
GVector operator- (const double &scalar, const GVector &vector)
 Subtract vector from scalar. More...
 
GVector operator* (const GVector &vector, const double &scalar)
 Multiply vector by scalar. More...
 
GVector operator* (const double &scalar, const GVector &vector)
 Multiply vector by scalar. More...
 
GVector operator/ (const GVector &vector, const double &scalar)
 Divide vector by scalar. More...
 

Detailed Description

Vector class interface definition.

Author
Juergen Knoedlseder

Definition in file GVector.hpp.

Function Documentation

GVector operator* ( const GVector vector,
const double &  scalar 
)
inline

Multiply vector by scalar.

Parameters
[in]vectorVector.
[in]scalarScalar.
Returns
Vector for which all elements have be multiplied by scalar.

Returns a vector for which all elements have be multiplied by scalar.

Definition at line 306 of file GVector.hpp.

GVector operator* ( const double &  scalar,
const GVector vector 
)
inline

Multiply vector by scalar.

Parameters
[in]scalarScalar.
[in]vectorVector.
Returns
Vector for which all elements have be multiplied by scalar.

Returns a vector for which all elements have be multiplied by scalar.

Definition at line 324 of file GVector.hpp.

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

Add two vectors.

Parameters
[in]aVector.
[in]bVector.
Returns
Sum of vectors a and b.

Returns the sum of vectors a and b.

Definition at line 196 of file GVector.hpp.

GVector operator+ ( const GVector vector,
const double &  scalar 
)
inline

Add scalar to vector.

Parameters
[in]vectorVector.
[in]scalarScalar.
Returns
Vector with scalar added to all elements.

Returns a vector for which the scalar has been added to all elements.

Definition at line 214 of file GVector.hpp.

GVector operator+ ( const double &  scalar,
const GVector vector 
)
inline

Add scalar to vector.

Parameters
[in]scalarScalar.
[in]vectorVector.
Returns
Vector with scalar added to all elements.

Returns a vector for which the scalar has been added to all elements.

Definition at line 232 of file GVector.hpp.

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

Subtract vector from vector.

Parameters
[in]aVector.
[in]bVector.
Returns
Difference between vector a and b.

Returns the difference between vector a and b.

Definition at line 250 of file GVector.hpp.

GVector operator- ( const GVector vector,
const double &  scalar 
)
inline

Subtract scalar from vector.

Parameters
[in]vectorVector.
[in]scalarScalar.
Returns
Vector with scalar subtracted from all elements.

Returns a vector for which the scalar has been subtracted from all elements.

Definition at line 269 of file GVector.hpp.

GVector operator- ( const double &  scalar,
const GVector vector 
)
inline

Subtract vector from scalar.

Parameters
[in]scalarScalar.
[in]vectorVector.
Returns
Vector with all elements subtracted from scalar.

Returns a vector for which all elements have been subtracted from the scalar.

Definition at line 288 of file GVector.hpp.

GVector operator/ ( const GVector vector,
const double &  scalar 
)
inline

Divide vector by scalar.

Parameters
[in]vectorVector.
[in]scalarScalar.
Returns
Vector for which all elements have be divided by scalar.

Returns a vector for which all elements have be divided by scalar.

Definition at line 342 of file GVector.hpp.