Files Classes Functions Hierarchy
#include <regionD2tess.h>
Public Member Functions | |
| regionD2tess (Vreg _vi, Vpts _pts) | |
| A tessellation is composed of regions and points. | |
| boolc | verify () const |
| Verify the regions are connected. | |
| void | print () const |
| Print out the tessellation to cout. | |
| void | printnumbered () const |
| Print out the tessellation with numbering on left side to cout. | |
Public Attributes | |
| Vreg | vi |
| Vector of region indexes to the points. | |
| Vpts | pts |
| Vector of points. | |
vi and pts are vectors.
Through the template parameters the client can control memory of the vectors, for example Vreg could be a vector holding the regions and Vpts a reference to the points.
Definition at line 22 of file regionD2tess.h.
| regionD2tess< Vreg, Vpts, Indx >::regionD2tess | ( | Vreg | _vi, | |
| Vpts | _pts | |||
| ) | [inline] |
| void regionD2tess< Vreg, Vpts, Indx >::print | ( | ) | const [inline] |
Print out the tessellation to cout.
Definition at line 76 of file regionD2tess.h.
References regionD2linked< Indx >::isnull(), and regionD2tess< Vreg, Vpts, Indx >::vi.
Referenced by regionD2linkedtest::test01().
00077 { 00078 Indx const imax = vi.size(); 00079 for (Indx i=0; i<imax; ++i) 00080 { 00081 regionD2linked<Indx> & reg(vi[i]); 00082 if (reg.isnull()) 00083 continue; 00084 00085 cout << (string)reg << endl; 00086 } 00087 }
| void regionD2tess< Vreg, Vpts, Indx >::printnumbered | ( | ) | const [inline] |
Print out the tessellation with numbering on left side to cout.
Definition at line 52 of file regionD2tess.h.
References regionD2linked< Indx >::isnull(), and regionD2tess< Vreg, Vpts, Indx >::vi.
00053 { 00054 // Preserve and later restore the setting. 00055 bool writesize = regionD2linked<Indx>::writesize; 00056 regionD2linked<Indx>::writesize = false; 00057 00058 Indx const imax = vi.size(); 00059 for (Indx i=0; i<imax; ++i) 00060 { 00061 cout << i << " "; 00062 regionD2linked<Indx> & reg(vi[i]); 00063 if (reg.isnull()) 00064 { 00065 cout << endl; 00066 continue; 00067 } 00068 00069 cout << (string)reg << endl; 00070 } 00071 00072 regionD2linked<Indx>::writesize = writesize; 00073 }
| boolc regionD2tess< Vreg, Vpts, Indx >::verify | ( | ) | const [inline] |
Verify the regions are connected.
Definition at line 90 of file regionD2tess.h.
References regionD2linked< Indx >::isnull(), pnlinkiter< Indx >::reset(), regionD2linked< Indx >::start, and regionD2tess< Vreg, Vpts, Indx >::vi.
Referenced by regionD2linkedtest::test01().
00091 { 00092 Indx const imax = vi.size(); 00093 for (Indx i=0; i<imax; ++i) 00094 { 00095 regionD2linked<Indx> & reg(vi[i]); 00096 if (reg.isnull()) 00097 continue; 00098 00099 pnlinkiter<Indx> k(reg.start); 00100 for ( k.reset(); !k; ++k ) 00101 { 00102 if (k->nlink>imax) 00103 return false; 00104 if (vi[k->nlink].start->niInverse(i) == 0) 00105 return false; 00106 } 00107 } 00108 00109 return true; 00110 }
| Vpts regionD2tess< Vreg, Vpts, Indx >::pts |
| Vreg regionD2tess< Vreg, Vpts, Indx >::vi |
Vector of region indexes to the points.
Definition at line 28 of file regionD2tess.h.
Referenced by regionD2tess< Vreg, Vpts, Indx >::print(), regionD2tess< Vreg, Vpts, Indx >::printnumbered(), and regionD2tess< Vreg, Vpts, Indx >::verify().
1.5.8