valSPH
 All Classes Files Functions Variables
Position Class Reference

#include <Position.h>

Collaboration diagram for Position:
Collaboration graph

Public Member Functions

 Position ()
 It creates a new empty position.
 
 Position (int n)
 It creates a new empty n-dimensional position.
 
 Position (vector< double > q)
 It creates a position whit the values of the vector supplied.
 
int getDim ()
 It suplies the dimension of the position.
 
void setDim (int n)
 It modifies the dimension of the position.
 
double getQi (int i)
 It retrieves the i coordinate of the position.
 
void setQi (int i, double qi)
 It modifies the value of the i coordinate.
 
double distance (Position q)
 It calculates the distance from itself to the position r.
 
 ~Position ()
 It destroys the position object.
 

Constructor & Destructor Documentation

Position::Position ( )

It creates a new empty position.

Position::Position ( int  n)

It creates a new empty n-dimensional position.

Position::Position ( vector< double >  q)

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

Parameters
qthe position vector
Position::~Position ( )

It destroys the position object.

Member Function Documentation

double Position::distance ( Position  q)

It calculates the distance from itself to the position r.

Parameters
qthe other position

Here is the call graph for this function:

Here is the caller graph for this function:

int Position::getDim ( )

It suplies the dimension of the position.

Returns
the dimension of the position

Here is the caller graph for this function:

double Position::getQi ( int  i)

It retrieves the i coordinate of the position.

Returns
i coordinate of the position

Here is the caller graph for this function:

void Position::setDim ( int  n)

It modifies the dimension of the position.

Parameters
nthe new dimension of the position

Here is the caller graph for this function:

void Position::setQi ( int  i,
double  qi 
)

It modifies the value of the i coordinate.

Parameters
imodified coordinate
qinew value for the coordinate

Here is the caller graph for this function:


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