Sundance::VertexView Class Reference

List of all members.

Public Member Functions

 VertexView ()
 VertexView (int **base, int offset, int length)
int hashCode () const
bool operator== (const VertexView &other) const
std::string toString () const

Private Attributes

int ** base_
int offset_
int length_


Detailed Description

VertexView is a read-only "view" of a cell's vertices, where the vertices are stored contiguously in a large master array. By working with views, we can greatly reduce the number of temporary arrays created during hashtable searches for existing vertex arrays.

Definition at line 47 of file SundanceBasicVertexView.hpp.


Constructor & Destructor Documentation

Sundance::VertexView::VertexView (  )  [inline]

empty ctor, needed for storing VertexViews in Teuchos hashtables

Definition at line 51 of file SundanceBasicVertexView.hpp.

Sundance::VertexView::VertexView ( int **  base,
int  offset,
int  length 
) [inline]

Construct a view into an array

Parameters:
bese pointer to the start of the master data array. By using double indirection, the master array can be resized or relocated and VertexViews can remain valid.
offset the index of the vertex subarray being viewed.
length the number of vertices included in this view.

Definition at line 59 of file SundanceBasicVertexView.hpp.


Member Function Documentation

int VertexView::hashCode (  )  const

Return a hash code for the vertex set.

Definition at line 25 of file SundanceBasicVertexView.cpp.

References base_, length_, and offset_.

bool Sundance::VertexView::operator== ( const VertexView other  )  const [inline]

Test equality between two vertex sets. Two vertex sets are equal when their vertices are identical.

Definition at line 89 of file SundanceBasicVertexView.hpp.

References base_, length_, and offset_.

string VertexView::toString (  )  const

Write to a std::string

Definition at line 9 of file SundanceBasicVertexView.cpp.

References base_, length_, and offset_.


Member Data Documentation

int** Sundance::VertexView::base_ [private]

Definition at line 80 of file SundanceBasicVertexView.hpp.

Referenced by hashCode(), operator==(), and toString().

Definition at line 82 of file SundanceBasicVertexView.hpp.

Referenced by hashCode(), operator==(), and toString().

Definition at line 81 of file SundanceBasicVertexView.hpp.

Referenced by hashCode(), operator==(), and toString().

Site Contact