vtf-logo

geom::Node_VertSelf< Mesh > Class Template Reference

A node in a simplicial mesh that stores a vertex and an iterator to itself. More...

#include <Node_VertSelf.h>

List of all members.

Public Types

typedef Mesh mesh_type
 The simplicial mesh.
typedef mesh_type::node_iterator node_iterator
 An iterator to a node.
typedef mesh_type::node_const_iterator node_const_iterator
 An iterator to a const node.
typedef mesh_type::number_type number_type
 The number type.
typedef ads::FixedArray< N,
number_type
vertex_type
 The vertex (a Cartesian point).
 N = Mesh::N
enum  { N = Mesh::N }
 The space dimension.

Public Member Functions

Constructors and Destructor.
 Node_VertSelf ()
 Default constructor. Uninitialized point, null iterator.
 Node_VertSelf (const vertex_type &vertex, const node_iterator self=0)
 Construct from a vertex and a node iterator.
void build (const vertex_type &vertex, const node_iterator self=0)
 Build from a vertex and a node iterator.
 Node_VertSelf (const Node_VertSelf &x)
 Copy constructor.
 ~Node_VertSelf ()
 Destructor.
Assignment operators.
Node_VertSelfoperator= (const Node_VertSelf &x)
 Assignment operator.
Accessors.
const vertex_typevertex () const
 Return the vertex.
node_const_iterator self () const
 Return a const iterator to the (possibly derived) node.
int identifier (const node_const_iterator nodes_begin) const
 Return the identifier (rank) of this node.
Manipulators.
node_iterator self ()
 Return an iterator to the (possibly derived) node.
void set_vertex (const vertex_type &vertex)
 Set the point.
void set_self (const node_iterator self)
 Set the iterator to the derived node.
Equality.
bool operator== (const Node_VertSelf &x) const
 Return true if this is equal to x.
bool operator!= (const Node_VertSelf &x) const
 Return true if this is not equal to x.
File I/O.
void put (std::ostream &out, const node_const_iterator nodes_begin) const
 Write the vertex and the node identifier.


Detailed Description

template<class Mesh>
class geom::Node_VertSelf< Mesh >

A node in a simplicial mesh that stores a vertex and an iterator to itself.

This class stores a vertex (a Cartesian point) and an iterator to itself. (The iterator could point to a derived node class.)


Member Function Documentation

template<class Mesh>
int geom::Node_VertSelf< Mesh >::identifier ( const node_const_iterator  nodes_begin  )  const [inline]

Return the identifier (rank) of this node.

The identifier is in the range [0...num_vertices). If the self iterator is null, return -1.

Note:
This function may be very inefficient. If the vertices are stored in a list, it will count from the beginning of the list to determine the identifier.

template<class Mesh>
void geom::Node_VertSelf< Mesh >::put ( std::ostream &  out,
const node_const_iterator  nodes_begin 
) const [inline]

Write the vertex and the node identifier.

Note:
Unless the nodes are stored in a random access container, this function is very inefficient.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:56:02 2007 for Computational Geometry Package by  doxygen 1.4.7