GammaLib  2.1.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 304 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 322 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 194 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 212 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 230 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 248 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 267 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 286 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 340 of file GVector.hpp.