DistributedVector::Stripe Class Reference

#include <DistributedVector.hpp>

Collaboration diagram for DistributedVector::Stripe:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Stripe (DistributedVector parallelVec, unsigned stripe)
double & operator[] (unsigned globalIndex) throw (DistributedVectorException)
double & operator[] (Iterator index) throw (DistributedVectorException)

Public Attributes

unsigned mStride
unsigned mStripe
double * mpVec


Detailed Description

Provide access to a particular stripe of a striped vector.

A striped vector has multiple types of information encoded within a single vector, with a layout like [x_1, y_1, z_1, x_2, y_2, z_2, ... x_n, y_n, z_n]. This class provides easy access to, for example, the x values.

Definition at line 173 of file DistributedVector.hpp.


Constructor & Destructor Documentation

DistributedVector::Stripe::Stripe ( DistributedVector  parallelVec,
unsigned  stripe 
) [inline]

Constructor.

Parameters:
parallelVec striped vector
stripe number of this stripe within the vector starting from 0

Definition at line 186 of file DistributedVector.hpp.

References DistributedVector::mNumChunks, and DistributedVector::mpVec.


Member Function Documentation

double& DistributedVector::Stripe::operator[] ( unsigned  globalIndex  )  throw (DistributedVectorException) [inline]

Access a particular element of the stripe if on this processor

Parameters:
globalIndex index within the stripe
Returns:
value of striped vector For use in tests. Will throw a DistributedVectorException if the specified element is not on this process.

Definition at line 201 of file DistributedVector.hpp.

References DistributedVector::mHi, and DistributedVector::mLo.

double& DistributedVector::Stripe::operator[] ( Iterator  index  )  throw (DistributedVectorException) [inline]

Parameters:
index 
Returns:
value of striped distributed vector pointed to by index.

Definition at line 214 of file DistributedVector.hpp.


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

Generated on Wed Mar 18 12:52:29 2009 for Chaste by  doxygen 1.5.5