proj home

Files   Classes   Functions   Hierarchy  

simplexD1indexed< INDX > Class Template Reference

Indexed line. More...

#include <simplexD1indexed.h>

Collaboration diagram for simplexD1indexed< INDX >:

List of all members.

Public Member Functions

 simplexD1indexed ()
 Construct a null line.
 simplexD1indexed (INDX const a, INDX const b)
 Construct a line.
boolc operator== (simplexD1indexed< INDX > const &t) const
 Are two lines the same?
void setnull ()
 Set all fields to 0.
boolc isnull () const
 Is this a line? Are all the fields set to zero?
ostreamprint (ostream &os) const
 Global << calls this.
 operator stringc () const
 Serialize this object.

Public Attributes

INDX pi [2]
 Indexes to points or vertexes.


Detailed Description

template<typename INDX = uint>
class simplexD1indexed< INDX >

Indexed line.

The indexes refer to points. These may or may not be ordered depending on the application.

Definition at line 14 of file simplexD1indexed.h.


Constructor & Destructor Documentation

template<typename INDX = uint>
simplexD1indexed< INDX >::simplexD1indexed (  )  [inline]

Construct a null line.

Definition at line 22 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00023     { pi[0] = pi[1] = 0; }

template<typename INDX = uint>
simplexD1indexed< INDX >::simplexD1indexed ( INDX const   a,
INDX const   b 
) [inline]

Construct a line.

Definition at line 25 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00026     { pi[0]=a; pi[1]=b; }


Member Function Documentation

template<typename INDX >
boolc simplexD1indexed< INDX >::isnull (  )  const [inline]

Is this a line? Are all the fields set to zero?

Definition at line 84 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00085 {
00086   if (pi[0]!=0)
00087     return false;
00088 
00089   if (pi[1]!=0)
00090     return false;
00091 
00092   return true;
00093 }

template<typename INDX >
simplexD1indexed< INDX >::operator stringc (  )  const [inline]

Serialize this object.

Definition at line 55 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00056 {
00057   stringstream ss;
00058   ss << pi[0] << " " << pi[1];
00059   return ss.str();
00060 }

template<typename INDX >
boolc simplexD1indexed< INDX >::operator== ( simplexD1indexed< INDX > const &  t  )  const [inline]

Are two lines the same?

Definition at line 64 of file simplexD1indexed.h.

00067 {
00068   if (pi[0]==t.pi[0])
00069   {
00070     if (pi[1]==t.pi[1])
00071       return true;
00072   }
00073 
00074   if (pi[0]==t.pi[1])
00075   {
00076     if (pi[1]==t.pi[0])
00077       return true;
00078   }
00079 
00080   return false;
00081 }

template<typename INDX = uint>
ostream& simplexD1indexed< INDX >::print ( ostream os  )  const [inline]

Global << calls this.

Definition at line 38 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00039     { return os << pi[0] << " " << pi[1]; }

template<typename INDX = uint>
void simplexD1indexed< INDX >::setnull (  )  [inline]

Set all fields to 0.

Definition at line 32 of file simplexD1indexed.h.

References simplexD1indexed< INDX >::pi.

00033     { pi[0] = pi[1] = 0; }


Member Data Documentation

template<typename INDX = uint>
INDX simplexD1indexed< INDX >::pi[2]


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

Generated on Fri Mar 4 00:50:16 2011 for Chelton Evans Source by  doxygen 1.5.8