CGAL 6.3-dev - 1D Arrangements
Loading...
Searching...
No Matches
AocTopologyTraits Concept Reference

Definition

The concept AocTopologyTraits encapsulates the topological data structures, storage layout, memory allocation, and navigation primitives required by CGAL::Arrangement_on_curve_1 to maintain subdivisions of a 1D carrier curve.

Refines
DefaultConstructible
CopyConstructible
Assignable
MoveConstructible
MoveAssignable
Has models
CGAL::Arrangement_on_curve_1::Open_topology_traits<GeometryTraits1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Closed_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Left_closed_topology_traits<GeometryTraits_1, VertexData, EdgeData,UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Right_closed_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Identified_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>

Types

typedef unspecified_type Allocator
 The allocator type of the internal containers.
typedef Allocator allocator_type
 The standard stl type.
typedef std::size_t Size
 Size type.
typedef unspecified_type Point_1
 The geometric point type stored at vertices.
typedef unspecified_type Vertex_descriptor
 The vertex descriptor type (std::size_t if UseVector is true, iterator otherwise).
typedef unspecified_type Edge_descriptor
 he edge descriptor type (std::size_t if UseVector is true, iterator otherwise).
typedef unspecified_type Vertex_const_descriptor
 Constant vertex descriptor type.
typedef unspecified_type Edge_const_descriptor
 Constant edge descriptor type.
typedef unspecified_type Vertex_descriptor_iterator
 An iterator over vertex descriptors.
typedef unspecified_type Edge_descriptor_iterator
 An iterator over edge descriptors.
typedef unspecified_type Vertex_descriptor_range
 A range over all vertex descriptors in the arrangement.
typedef unspecified_type Edge_descriptor_range
 A range over all edge descriptors in the arrangement.
typedef unspecified_type Vertex_point_map
 A readable and writable lvalue property map mapping Vertex_descriptor to const Point_1&.
typedef unspecified_type Vertex_data_map
 A readable and writable property map mapping Vertex_descriptor to extended vertex user data.
typedef unspecified_type Edge_data_map
 A readable and writable property map mapping Edge_descriptor to extended edge user data.

Constants

static constexpr bool use_vector = UseVector
 Reflects the value of template parameter UseVector.

Queries and Ranges

bool empty () const
 returns whether the arrangement contains no vertices.
Size number_of_vertices () const
 returns the number of vertices in the arrangement.
Size number_of_edges () const
 returns the number of edges in the arrangement.
Vertex_descriptor_range vertices () const
 returns a range of all vertex descriptors.
Edge_descriptor_range edges () const
 returns a range of all edge descriptors.
Vertex_point_map vertex_point_map () const
 obtains the property map for vertex geometric points.
Vertex_data_map vertex_data_map () const
 obtains the property map for vertex user data.
Edge_data_map edge_data_map () const
 obtains the property map for edge user data.
Allocator get_allocator () const noexcept
 returns the allocator used by the traits.

Navigation

Edge_descriptor left_boundary_edge ()
 obtains the leftmost boundary edge.
Edge_const_descriptor left_boundary_edge () const
 obtains the leftmost boundary edge (const version).
Edge_descriptor right_boundary_edge ()
 obtains the rightmost boundary edge.
Edge_const_descriptor right_boundary_edge () const
 obtains the rightmost boundary edge (const version).
Edge_descriptor left_edge (Vertex_descriptor v)
 returns the edge incident to the left of vertex v.
Edge_descriptor right_edge (Vertex_descriptor v)
 returns the edge incident to the right of vertex v.
Vertex_descriptor left_vertex (Edge_descriptor e)
 returns the vertex incident to the left endpoint of edge e.
Vertex_descriptor right_vertex (Edge_descriptor e)
 returns the vertex incident to the right endpoint of edge e.
bool has_left_vertex (Edge_const_descriptor e) const
 returns whether edge e has a left endpoint (is closed on the left).
bool has_right_vertex (Edge_const_descriptor e) const
 returns whether edge e has a right endpoint (is closed on the right).
const Point_1 & vertex_point (Vertex_const_descriptor v) const
 directly returns the geometric point associated with vertex v.

Low-Level Storage Primitives

void set_left_boundary_edge (Edge_descriptor e)
 sets the leftmost boundary edge descriptor.
void set_right_boundary_edge (Edge_descriptor e)
 sets the rightmost boundary edge descriptor.
Vertex_descriptor create_vertex (const Point_1 &p, const GeometryTraits_1 &gt)
 creates a new vertex associated with point p.
Vertex_descriptor create_vertex (const Point_1 &p)
 creates a new vertex associated with point p without registering it as a boundary vertex or as the identification vertex.
Edge_descriptor create_edge ()
 creates a new uninitialized edge.
void set_left_edge (Vertex_descriptor v, Edge_descriptor e)
 sets e as the left incident edge of vertex v.
void set_right_edge (Vertex_descriptor v, Edge_descriptor e)
 sets e as the right incident edge of vertex v.
void set_left_vertex (Edge_descriptor e, Vertex_descriptor v)
 sets v as the left endpoint vertex of edge e.
void set_right_vertex (Edge_descriptor e, Vertex_descriptor v)
 sets v as the right endpoint vertex of edge e.
void clear_left_vertex (Edge_descriptor e)
 unbinds the left vertex of edge e.
void clear_right_vertex (Edge_descriptor e)
 unbinds the right vertex of edge e.
void erase_vertex (Vertex_descriptor v)
 erases vertex v.
void erase_edge (Edge_descriptor e)
 erases edge e.
void clear ()
 removes all vertices and edges and resets the topology to its initial state.
void reserve (Size num_vertices, Size num_edges)
 reserves storage for num_vertices vertices and num_edges edges, so that, in vector mode, no reallocation occurs until these numbers are exceeded; has no effect in list mode.
void swap (AocTopologyTraits &other) noexcept
 swaps the content of the topology traits with other.

Member Function Documentation

◆ create_vertex() [1/2]

Vertex_descriptor AocTopologyTraits::create_vertex ( const Point_1 & p)

creates a new vertex associated with point p without registering it as a boundary vertex or as the identification vertex.

It is used when the caller knows the location of p in the parameter space, which spares the geometric test; the caller registers the vertex if needed.

◆ create_vertex() [2/2]

Vertex_descriptor AocTopologyTraits::create_vertex ( const Point_1 & p,
const GeometryTraits_1 & gt )

creates a new vertex associated with point p.

If p lies on a closed boundary or is the identification point, the vertex is registered as the corresponding boundary vertex or as the identification vertex, respectively; gt is used to determine this.

◆ erase_edge()

void AocTopologyTraits::erase_edge ( Edge_descriptor e)

erases edge e.

Precondition
e is neither the left nor the right boundary edge.

#include <Concepts/AocTopologyTraits.h>

Definition

The concept AocTopologyTraits encapsulates the topological data structures, storage layout, memory allocation, and navigation primitives required by CGAL::Arrangement_on_curve_1 to maintain subdivisions of a 1D carrier curve.

Refines
DefaultConstructible
CopyConstructible
Assignable
MoveConstructible
MoveAssignable
Has models
CGAL::Arrangement_on_curve_1::Open_topology_traits<GeometryTraits1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Closed_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Left_closed_topology_traits<GeometryTraits_1, VertexData, EdgeData,UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Right_closed_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>
CGAL::Arrangement_on_curve_1::Identified_topology_traits<GeometryTraits_1, VertexData, EdgeData, UseVector, Allocator>

Types

typedef unspecified_type Allocator
 The allocator type of the internal containers.
typedef Allocator allocator_type
 The standard stl type.
typedef std::size_t Size
 Size type.
typedef unspecified_type Point_1
 The geometric point type stored at vertices.
typedef unspecified_type Vertex_descriptor
 The vertex descriptor type (std::size_t if UseVector is true, iterator otherwise).
typedef unspecified_type Edge_descriptor
 he edge descriptor type (std::size_t if UseVector is true, iterator otherwise).
typedef unspecified_type Vertex_const_descriptor
 Constant vertex descriptor type.
typedef unspecified_type Edge_const_descriptor
 Constant edge descriptor type.
typedef unspecified_type Vertex_descriptor_iterator
 An iterator over vertex descriptors.
typedef unspecified_type Edge_descriptor_iterator
 An iterator over edge descriptors.
typedef unspecified_type Vertex_descriptor_range
 A range over all vertex descriptors in the arrangement.
typedef unspecified_type Edge_descriptor_range
 A range over all edge descriptors in the arrangement.
typedef unspecified_type Vertex_point_map
 A readable and writable lvalue property map mapping Vertex_descriptor to const Point_1&.
typedef unspecified_type Vertex_data_map
 A readable and writable property map mapping Vertex_descriptor to extended vertex user data.
typedef unspecified_type Edge_data_map
 A readable and writable property map mapping Edge_descriptor to extended edge user data.

Constants

static constexpr bool use_vector = UseVector
 Reflects the value of template parameter UseVector.

Queries and Ranges

bool empty () const
 returns whether the arrangement contains no vertices.
Size number_of_vertices () const
 returns the number of vertices in the arrangement.
Size number_of_edges () const
 returns the number of edges in the arrangement.
Vertex_descriptor_range vertices () const
 returns a range of all vertex descriptors.
Edge_descriptor_range edges () const
 returns a range of all edge descriptors.
Vertex_point_map vertex_point_map () const
 obtains the property map for vertex geometric points.
Vertex_data_map vertex_data_map () const
 obtains the property map for vertex user data.
Edge_data_map edge_data_map () const
 obtains the property map for edge user data.
Allocator get_allocator () const noexcept
 returns the allocator used by the traits.

Navigation

Edge_descriptor left_boundary_edge ()
 obtains the leftmost boundary edge.
Edge_const_descriptor left_boundary_edge () const
 obtains the leftmost boundary edge (const version).
Edge_descriptor right_boundary_edge ()
 obtains the rightmost boundary edge.
Edge_const_descriptor right_boundary_edge () const
 obtains the rightmost boundary edge (const version).
Edge_descriptor left_edge (Vertex_descriptor v)
 returns the edge incident to the left of vertex v.
Edge_descriptor right_edge (Vertex_descriptor v)
 returns the edge incident to the right of vertex v.
Vertex_descriptor left_vertex (Edge_descriptor e)
 returns the vertex incident to the left endpoint of edge e.
Vertex_descriptor right_vertex (Edge_descriptor e)
 returns the vertex incident to the right endpoint of edge e.
bool has_left_vertex (Edge_const_descriptor e) const
 returns whether edge e has a left endpoint (is closed on the left).
bool has_right_vertex (Edge_const_descriptor e) const
 returns whether edge e has a right endpoint (is closed on the right).
const Point_1 & vertex_point (Vertex_const_descriptor v) const
 directly returns the geometric point associated with vertex v.

Low-Level Storage Primitives

void set_left_boundary_edge (Edge_descriptor e)
 sets the leftmost boundary edge descriptor.
void set_right_boundary_edge (Edge_descriptor e)
 sets the rightmost boundary edge descriptor.
Vertex_descriptor create_vertex (const Point_1 &p, const GeometryTraits_1 &gt)
 creates a new vertex associated with point p.
Vertex_descriptor create_vertex (const Point_1 &p)
 creates a new vertex associated with point p without registering it as a boundary vertex or as the identification vertex.
Edge_descriptor create_edge ()
 creates a new uninitialized edge.
void set_left_edge (Vertex_descriptor v, Edge_descriptor e)
 sets e as the left incident edge of vertex v.
void set_right_edge (Vertex_descriptor v, Edge_descriptor e)
 sets e as the right incident edge of vertex v.
void set_left_vertex (Edge_descriptor e, Vertex_descriptor v)
 sets v as the left endpoint vertex of edge e.
void set_right_vertex (Edge_descriptor e, Vertex_descriptor v)
 sets v as the right endpoint vertex of edge e.
void clear_left_vertex (Edge_descriptor e)
 unbinds the left vertex of edge e.
void clear_right_vertex (Edge_descriptor e)
 unbinds the right vertex of edge e.
void erase_vertex (Vertex_descriptor v)
 erases vertex v.
void erase_edge (Edge_descriptor e)
 erases edge e.
void clear ()
 removes all vertices and edges and resets the topology to its initial state.
void reserve (Size num_vertices, Size num_edges)
 reserves storage for num_vertices vertices and num_edges edges, so that, in vector mode, no reallocation occurs until these numbers are exceeded; has no effect in list mode.
void swap (AocTopologyTraits &other) noexcept
 swaps the content of the topology traits with other.

Member Function Documentation

◆ create_vertex() [1/2]

Vertex_descriptor AocTopologyTraits::create_vertex ( const Point_1 & p)

creates a new vertex associated with point p without registering it as a boundary vertex or as the identification vertex.

It is used when the caller knows the location of p in the parameter space, which spares the geometric test; the caller registers the vertex if needed.

◆ create_vertex() [2/2]

Vertex_descriptor AocTopologyTraits::create_vertex ( const Point_1 & p,
const GeometryTraits_1 & gt )

creates a new vertex associated with point p.

If p lies on a closed boundary or is the identification point, the vertex is registered as the corresponding boundary vertex or as the identification vertex, respectively; gt is used to determine this.

◆ erase_edge()

void AocTopologyTraits::erase_edge ( Edge_descriptor e)

erases edge e.

Precondition
e is neither the left nor the right boundary edge.