SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Public Types | Public Member Functions | Public Attributes | List of all members
smile::CPointMassSet< NumT > Struct Template Reference

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< ElemTypeType
 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...
 
ElemTypeat (size_t index)
 
const ElemTypeat (size_t index) const
 
ElemTypeoperator[] (size_t index)
 
const ElemTypeoperator[] (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
 

Detailed Description

template<typename NumT>
struct smile::CPointMassSet< NumT >

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.

Template Parameters
NumTis a numerical type (double or float)

Constructor & Destructor Documentation

template<typename NumT>
template<typename OtherNumT >
smile::CPointMassSet< NumT >::CPointMassSet ( const CPointMassSet< OtherNumT > &  src)
inline

a seamless conversion constructor from another point mass set with a possibly different template argument.

Template Parameters
OtherNumTis a numerical type (double or float) of the source PointMassSet

The documentation for this struct was generated from the following file: