\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.2 - Halfedge Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
HalfedgeDS/hds_prog_edge_iterator.cpp
#include <CGAL/HalfedgeDS_default.h>
#include <CGAL/HalfedgeDS_decorator.h>
#include <CGAL/N_step_adaptor.h>
struct Traits { typedef int Point_2; };
typedef HDS::Halfedge_iterator Halfedge_iterator;
int main() {
HDS hds;
Decorator decorator(hds);
decorator.create_loop();
decorator.create_segment();
CGAL_assertion( decorator.is_valid());
int n = 0;
for ( Iterator e = hds.halfedges_begin(); e != hds.halfedges_end(); ++e)
++n;
CGAL_assertion( n == 2); // == 2 edges
return 0;
}