ParticleArray< T > Class Template Reference

#include <ParticleArray.h>

List of all members.


Detailed Description

template<class T>
class ParticleArray< T >

Container class to store particle positions in the x,y, and z directions, centroids and moments.

Public Member Functions

 ParticleArray (uint32 total_temp)
 Constructor, allocates memory for particles, sets total to the argument passed.
 ParticleArray ()
 Default Constructor, sets total to zero.
 ~ParticleArray ()
 Destructor.
void resize (uint32 total_temp)
 Allocates or reallocates memory, sets total to argument passed.
int size ()
 Returns the number of particles.
void printData (std::ostream &os)
 Prints all of the data.
void printXYZ (std::ostream &os)
 Prints only the xyz data.
void printRasmol (std::ostream &os)
 Prints only the xyz data in rasmol format.
void printRasmol (std::ostream &os, float scaleWidth, float scaleHeight, float scaleDepth)
 Prints only the xyz data in rasmol format that utilizes centroid data and the actual dimensions of the system.
getValue (int i, int j)
 Routine to fetch value at specific index location (i,j).
void setValue (int i, int j, T value)

Public Attributes

uint32 total
 number of particles
T * particle
 particle array

Constructor & Destructor Documentation

template<class T>
ParticleArray< T >::ParticleArray ( uint32  total_temp  )  [inline]

Constructor, allocates memory for particles, sets total to the argument passed.

Parameters:
total_temp Number of particles.

template<class T>
ParticleArray< T >::ParticleArray (  )  [inline]

Default Constructor, sets total to zero.

template<class T>
ParticleArray< T >::~ParticleArray (  )  [inline]

Destructor.


Member Function Documentation

template<class T>
void ParticleArray< T >::resize ( uint32  total_temp  )  [inline]

Allocates or reallocates memory, sets total to argument passed.

Parameters:
total_temp Number of particles

template<class T>
int ParticleArray< T >::size (  )  [inline]

Returns the number of particles.

template<class T>
void ParticleArray< T >::printData ( std::ostream &  os  )  [inline]

Prints all of the data.

Parameters:
os Destination of output. Can be std::out, file, etc.

template<class T>
void ParticleArray< T >::printXYZ ( std::ostream &  os  )  [inline]

Prints only the xyz data.

Parameters:
os Destination of output. Can be std::out, file, etc.

template<class T>
void ParticleArray< T >::printRasmol ( std::ostream &  os  )  [inline]

Prints only the xyz data in rasmol format.

Parameters:
os Destination of output. Can be std::out, file, etc.

template<class T>
void ParticleArray< T >::printRasmol ( std::ostream &  os,
float  scaleWidth,
float  scaleHeight,
float  scaleDepth 
) [inline]

Prints only the xyz data in rasmol format that utilizes centroid data and the actual dimensions of the system.

Parameters:
os Destination of output. Can be std::out, file, etc.
scaleWidth Length of a pixel in the width dimension
scaleHeight Length of a pixel in the height dimension
scaleDepth Length of a pixel in the depth dimension

template<class T>
T ParticleArray< T >::getValue ( int  i,
int  j 
) [inline]

Routine to fetch value at specific index location (i,j).

Provides an easy routine to fetch a value since 1-D arrays are less user-friendly.

Parameters:
i Particle ID.
j Dimension (0-2), centroid (3-5), m_0 (6), m_2 (7) .

template<class T>
void ParticleArray< T >::setValue ( int  i,
int  j,
value 
) [inline]


Member Data Documentation

template<class T>
uint32 ParticleArray< T >::total

number of particles

template<class T>
T* ParticleArray< T >::particle

particle array


The documentation for this class was generated from the following file:
Generated on Mon Aug 27 13:39:31 2007 for IPAnalysis by  doxygen 1.5.3