A system of generators. 
An object of the class Generator_System is a system of generators, i.e., a multiset of objects of the class Generator (lines, rays, points and closure points). When inserting generators in a system, space dimensions are automatically adjusted so that all the generators in the system are defined on the same vector space. A system of generators which is meant to define a non-empty polyhedron must include at least one point: the reason is that lines, rays and closure points need a supporting point (lines and rays only specify directions while closure points only specify points in the topological closure of the NNC polyhedron).
- In all the examples it is assumed that variables xandyare defined as follows:Variable x(0); Variable y(1); 
- Example 1
- The following code defines the line having the same direction as the  axis (i.e., the first Cartesian axis) in axis (i.e., the first Cartesian axis) in : :
gs.insert(line(x + 0*y)); 
 As said above, this system of generators corresponds to an empty polyhedron, because the line has no supporting point. To define a system of generators that does correspond to the axis, we can add the following code which inserts the origin of the space as a point: axis, we can add the following code which inserts the origin of the space as a point:gs.insert(point(0*x + 0*y)); 
 axis through the point axis through the point . .gs.insert(point(0*x + 1*y)); 
- Example 2
- The following code builds a ray having the same direction as the positive part of the  axis in axis in :  To define a system of generators indeed corresponding to the set :  To define a system of generators indeed corresponding to the set
![\[ \bigl\{\, (x, 0)^\transpose \in \Rset^2 \bigm| x \geq 0 \,\bigr\}, \]](form_568.png)  
 one just has to add the origin:gs.insert(point(0*x + 0*y)); 
- Example 3
- The following code builds a system of generators having four points and corresponding to a square in  (the same as Example 1 for the system of constraints): (the same as Example 1 for the system of constraints):
gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + 3*y)); gs.insert(point(3*x + 0*y)); gs.insert(point(3*x + 3*y)); 
 
- Example 4
- By using closure points, we can define the kernel (i.e., the largest open set included in a given set) of the square defined in the previous example. Note that a supporting point is needed and, for that purpose, any inner point could be considered. 
gs.insert(point(x + y)); gs.insert(closure_point(0*x + 0*y)); gs.insert(closure_point(0*x + 3*y)); gs.insert(closure_point(3*x + 0*y)); gs.insert(closure_point(3*x + 3*y)); 
 
- Example 5
- The following code builds a system of generators having two points and a ray, corresponding to a half-strip in  (the same as Example 2 for the system of constraints): (the same as Example 2 for the system of constraints):
gs.insert(point(0*x + 0*y)); gs.insert(point(0*x + 1*y)); gs.insert(ray(x - y)); 
 
- Note
- After inserting a multiset of generators in a generator system, there are no guarantees that an exact copy of them can be retrieved: in general, only an equivalent generator system will be available, where original generators may have been reordered, removed (if they are duplicate or redundant), etc.