SMILE
v2.5
Schwarzschild Modelling Interactive expLoratory Environment
|
An array of particles with positions, velocities and masses. More...
#include <common.h>
Public Types | |
typedef std::pair < CPosVelPoint< NumT >, NumT > | ElemType |
templated typedef of a single particle | |
typedef std::vector< ElemType > | Type |
templated typedef of an array of particles | |
Public Member Functions | |
CPointMassSet () | |
default empty constructor | |
template<typename OtherNumT > | |
CPointMassSet (const CPointMassSet< OtherNumT > &src) | |
a seamless conversion constructor from another point mass set with a possibly different template argument. More... | |
ElemType & | at (size_t index) |
const ElemType & | at (size_t index) const |
ElemType & | operator[] (size_t index) |
const ElemType & | operator[] (size_t index) const |
size_t | size () const |
void | add (const CPosVelPoint< NumT > &first, const NumT second) |
convenience function to add an element | |
Public Attributes | |
Type | data |
particles are stored in this array | |
An array of particles with positions, velocities and masses.
It is implemented as a separate structure instead of just a vector of pairs, because of the limitations of C++ that don't allow to template a typedef without a class.
NumT | is a numerical type (double or float) |
|
inline |
a seamless conversion constructor from another point mass set with a possibly different template argument.
OtherNumT | is a numerical type (double or float) of the source PointMassSet |