valSPH
 All Classes Files Functions Variables
Momentum Class Reference

#include <Momentum.h>

Collaboration diagram for Momentum:
Collaboration graph

Public Member Functions

 Momentum ()
 It creates a new empty momentum.
 
 Momentum (int n)
 It creates a new empty n-dimensional momentum.
 
 Momentum (vector< double > p)
 It creates a momentum whit the values of the vector supplied.
 
int getDim ()
 It suplies the dimension of the momentum.
 
void setDim (int n)
 It modifies the dimension of the momentum.
 
double getPi (int i)
 It retrieves the i coordinate of the momentum.
 
void setPi (int i, double pi)
 It modifies the value of the i coordinate.
 
 ~Momentum ()
 It destroys the momentum object.
 

Constructor & Destructor Documentation

Momentum::Momentum ( )

It creates a new empty momentum.

Momentum::Momentum ( int  n)

It creates a new empty n-dimensional momentum.

Momentum::Momentum ( vector< double >  p)

It creates a momentum whit the values of the vector supplied.

Parameters
pthe momentum vector
Momentum::~Momentum ( )

It destroys the momentum object.

Member Function Documentation

int Momentum::getDim ( )

It suplies the dimension of the momentum.

Returns
the dimension of the momentum
double Momentum::getPi ( int  i)

It retrieves the i coordinate of the momentum.

Returns
i coordinate of the momentum

Here is the caller graph for this function:

void Momentum::setDim ( int  n)

It modifies the dimension of the momentum.

Parameters
nthe new dimension of the momentum

Here is the caller graph for this function:

void Momentum::setPi ( int  i,
double  pi 
)

It modifies the value of the i coordinate.

Parameters
imodified coordinate
pinew value for the coordinate

Here is the caller graph for this function:


The documentation for this class was generated from the following files: