proj home

Files   Classes   Functions   Hierarchy  

polytopeD2linked.h

Go to the documentation of this file.
00001 #ifndef POLYTOPED2LINKED_H
00002 #define POLYTOPED2LINKED_H
00003 
00004 #include <cassert>
00005 #include <vector>
00006 using namespace std;
00007 
00008 
00009 #include <typedefs.h>
00010 
00034 class polytopeD2linked
00035 {
00036 public:
00037 
00039   vector<uint> pi;
00041   vector<uint> ni;
00042 
00045   uintc nifrom( uintc gpt ) const
00046     { return ni[piInverse(gpt)]; }
00047 
00049   polytopeD2linked() {}
00050 
00052   polytopeD2linked(uintc p0, uintc p1, uintc n0, uintc n1);
00054   polytopeD2linked
00055   (
00056     uintc p0, uintc p1, uintc p2,
00057     uintc n0, uintc n1, uintc n2
00058   );
00060   polytopeD2linked
00061   (
00062     uintc p0, uintc p1, uintc p2, uintc p3,
00063     uintc n0, uintc n1, uintc n2, uintc n3
00064   );
00066   polytopeD2linked
00067   (
00068     uintc p0, uintc p1, uintc p2, uintc p3, uintc p4,
00069     uintc n0, uintc n1, uintc n2, uintc n3, uintc n4
00070   );
00072   polytopeD2linked
00073   (
00074     uintc p0, uintc p1, uintc p2, uintc p3, uintc p4, uintc p5,
00075     uintc n0, uintc n1, uintc n2, uintc n3, uintc n4, uintc n5
00076   );
00078   polytopeD2linked
00079   (
00080     uintc p0, uintc p1, uintc p2, uintc p3, uintc p4, uintc p5, uintc p6,
00081     uintc n0, uintc n1, uintc n2, uintc n3, uintc n4, uintc n5, uintc n6
00082   );
00084   polytopeD2linked
00085   (
00086     uintc p0, uintc p1, uintc p2, uintc p3, uintc p4, uintc p5, uintc p6, uintc p7,
00087     uintc n0, uintc n1, uintc n2, uintc n3, uintc n4, uintc n5, uintc n6, uintc n7
00088   );
00090   polytopeD2linked & add(uintc p, uintc n)
00091     { pi.push_back(p); ni.push_back(n); return *this; }
00092 
00094   uintc piInverse( uintc gpt ) const
00095   {
00096     assert(gpt!=0);
00097     uintc sz = pi.size();
00098     for ( uint i=0; i<sz; ++i)
00099       if (pi[i]==gpt)
00100         return i;
00101 
00102     assert(false);
00103     return sz+1;
00104   }
00105 
00107   boolc isnull() const
00108     { return pi.empty(); }
00109 
00111   boolc niInverseHas( uintc neib ) const;
00112 
00114   operator string() const;
00115 
00118   void addpoint( uintc ptindex, uintc ptglobal );
00119 };
00120 
00121 
00122 
00123 
00124 #endif
00125 
00126 

Generated on Fri Mar 4 00:49:26 2011 for Chelton Evans Source by  doxygen 1.5.8