DistributedVector::Chunk Class Reference

#include <DistributedVector.hpp>

Collaboration diagram for DistributedVector::Chunk:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Public Attributes

unsigned mOffset
double * mpVec


Detailed Description

Provide access to a particular chunk of a chunked vector.

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

Definition at line 228 of file DistributedVector.hpp.


Constructor & Destructor Documentation

DistributedVector::Chunk::Chunk ( DistributedVector  parallelVec,
unsigned  chunk 
) [inline]

Constructor

Parameters:
parallelVec chunked vector
chunk number of this chunk within the vector starting from 0

Definition at line 240 of file DistributedVector.hpp.

References DistributedVector::mHi, DistributedVector::mLo, DistributedVector::mNumChunks, mOffset, and DistributedVector::mpVec.


Member Function Documentation

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

Access a particular element of the chunk if on this processor

Parameters:
globalIndex index within the chunk
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 254 of file DistributedVector.hpp.

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

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

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

Definition at line 268 of file DistributedVector.hpp.

References mOffset.


Member Data Documentation

The start of this chunk within the locally-owned part of the vector.

Definition at line 232 of file DistributedVector.hpp.

Referenced by Chunk(), and operator[]().


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