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

Definition

Refines
DefaultConstructible
Has models
CGAL::Arrangement_on_curve_1::Arrangement_on_curve_1<GeometryTraits_1, TopologyTraits, BinarySearch>

A model of the concept ArrangementOnCurve_1 can be used to represent a 1D subdivision of a continuous geometric curve (a 1D "master curve" or line space) into alternating vertices and edges, collectively referred to as cells.

The geometry is governed by the GeometryTraits_1 template parameter, which must model the concept AocTraits_1. In particular, any model of the concept GeometryTraits_1 must define the Left_side_category and Right_side_category categories to describe whether the parameter space is open, closed, or identified at each end. When both categories are CGAL::Arrangement_on_curve_1::Identified_side_tag, the curve is cyclic.

Types

typedef unspecified_type Size
 the size type (convertible to size_t).
typedef unspecified_type Point_1
 The 1D arrangement point representation.
typedef unspecified_type Vertex_descriptor
 Descriptor targeting a mutable vertex element.
typedef unspecified_type Edge_descriptor
 Descriptor targeting a mutable edge element.
typedef unspecified_type Vertex_const_descriptor
 Descriptor targeting an immutable vertex element.
typedef unspecified_type Edge_const_descriptor
 Descriptor targeting an immutable edge element.
typedef std::variant< Vertex_descriptor, Edge_descriptor > Location_result
 Represents a point localization result within the 1D curve structure.
typedef std::variant< Vertex_const_descriptor, Edge_const_descriptor > Const_location_result

Boundary Categories

typedef unspecified_type Left_side_category
 Tag type describing the left boundary condition.
typedef unspecified_type Right_side_category
 Tag type describing the right boundary condition.

Accessors

static constexpr bool is_identified
 is true if the curve is cyclic (both Left_side_category and Right_side_category are CGAL::Arrangement_on_curve_1::Identified_side_tag).
bool empty () const
 returns true if the arrangement does not contain any vertices.
Size number_of_vertices () const
 obtains the total count of vertices resting along the carrier curve.
Size number_of_edges () const
 obtains the total number of edges.
auto vertices () const
 obtains an iterator range tracking all constant vertex descriptors.
auto edges () const
 obtains an iterator range tracking all constant edge descriptors.
auto vertex_point_map () const
 obtains an lvalue property map matching vertex descriptors to their coordinate positions.
auto vertex_data_map () const
 obtains an lvalue property map matching vertex descriptors to their extended user attributes.
auto edge_data_map () const
 obtains an lvalue property map matching edge descriptors to their extended user attributes.
Edge_descriptor left_boundary_edge ()
 obtains the descriptor of the leftmost edge.
Edge_const_descriptor left_boundary_edge () const
 obtains the constant descriptor of the leftmost edge.
Edge_descriptor right_boundary_edge ()
 obtains the descriptor of the rightmost edge.
Edge_const_descriptor right_boundary_edge () const
 obtains the constant descriptor of the rightmost edge.
Vertex_const_descriptor left_vertex (Edge_const_descriptor e) const
 obtains the descriptor of the left vertex of an edge.
Vertex_const_descriptor right_vertex (Edge_const_descriptor e) const
 obtains the descriptor of the right vertex of an edge.
Edge_const_descriptor left_edge (Vertex_const_descriptor v) const
 obtains the descriptor of the left edge of a vertex.
Edge_const_descriptor right_edge (Vertex_const_descriptor v) const
 obtains the descriptor of the right edge of a vertex.
bool has_left_vertex (Edge_const_descriptor e) const
 determines whether an edge has a left vertex.
bool has_right_vertex (Edge_const_descriptor e) const
 determines whether an edge has a right vertex.

Modifiers

Vertex_descriptor create_vertex (const Point_1 &p)
 creates a new vertex, enforcing the sorted ordering invariant when BinarySearch is true.
Edge_descriptor create_edge ()
 creates a new edge.
void destroy_vertex (Vertex_descriptor v)
 destroys a given vertex.
void destroy_edge (Edge_descriptor e)
 destroys a given edge.
Vertex_descriptor insert_empty (const Point_1 &p)
 inserts the very first point into an empty arrangement.
Vertex_descriptor insert_before (Vertex_descriptor v, const Point_1 &p)
 inserts a new point p strictly to the left of an existing vertex v.
Vertex_descriptor insert_after (Vertex_descriptor v, const Point_1 &p)
 inserts a new point p strictly to the right of an existing vertex v.
Vertex_descriptor split_edge (Edge_descriptor e, const Point_1 &p)
 splits the edge e by inserting a new point p inside it.
void remove (Vertex_descriptor v)
 removes vertex v from the arrangement.
void clear ()
 clears the arrangement.
void reserve (Size num_vertices)
 reserves storage for num_vertices vertices and the edges between them, so that, in vector mode, no reallocation occurs until the arrangement has more vertices; has no effect in list mode.

Member Typedef Documentation

◆ Left_side_category

Tag type describing the left boundary condition.

Reflects GeometryTraits_1::Left_side_category.

◆ Location_result

Represents a point localization result within the 1D curve structure.

A coordinate query point matches a Vertex_descriptor if it rests on an arrangement vertex, or an Edge_descriptor if it falls inside an edge.

◆ Right_side_category

Tag type describing the right boundary condition.

Reflects GeometryTraits_1::Right_side_category.

Member Function Documentation

◆ has_left_vertex()

bool ArrangementOnCurve_1::has_left_vertex ( Edge_const_descriptor e) const

determines whether an edge has a left vertex.

Parameters
ethe edge.

◆ has_right_vertex()

bool ArrangementOnCurve_1::has_right_vertex ( Edge_const_descriptor e) const

determines whether an edge has a right vertex.

Parameters
ethe edge.

◆ insert_after()

Vertex_descriptor ArrangementOnCurve_1::insert_after ( Vertex_descriptor v,
const Point_1 & p )

inserts a new point p strictly to the right of an existing vertex v.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.

◆ insert_before()

Vertex_descriptor ArrangementOnCurve_1::insert_before ( Vertex_descriptor v,
const Point_1 & p )

inserts a new point p strictly to the left of an existing vertex v.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.

◆ insert_empty()

Vertex_descriptor ArrangementOnCurve_1::insert_empty ( const Point_1 & p)

inserts the very first point into an empty arrangement.

If the parameter space is not identified, the single edge that spans the parameter space is split into the edge to the left of the new vertex v and the edge to the right of v. Otherwise, the single edge becomes a self-loop whose two ends are v.

Parameters
pthe point to insert.

◆ left_boundary_edge()

Edge_descriptor ArrangementOnCurve_1::left_boundary_edge ( )

obtains the descriptor of the leftmost edge.

If the parameter space is identified, this is the edge whose left vertex is the identification vertex, or, if the identification vertex does not exist, the edge that contains the identification point.

◆ left_edge()

Edge_const_descriptor ArrangementOnCurve_1::left_edge ( Vertex_const_descriptor v) const

obtains the descriptor of the left edge of a vertex.

Parameters
vthe vertex.

◆ left_vertex()

Vertex_const_descriptor ArrangementOnCurve_1::left_vertex ( Edge_const_descriptor e) const

obtains the descriptor of the left vertex of an edge.

Parameters
ethe edge.
Precondition
has_left_vertex(e) is true.

◆ remove()

void ArrangementOnCurve_1::remove ( Vertex_descriptor v)

removes vertex v from the arrangement.

If the two edges incident to v are distinct, they are merged into a single edge. Otherwise, v is a boundary vertex of a closed side, or the only vertex of an arrangement on an identified parameter space, and no edge is removed; in the latter case the arrangement becomes empty.

◆ right_boundary_edge()

Edge_descriptor ArrangementOnCurve_1::right_boundary_edge ( )

obtains the descriptor of the rightmost edge.

If the parameter space is identified, this is the edge whose right vertex is the identification vertex, or, if the identification vertex does not exist, the edge that contains the identification point, that is, left_boundary_edge().

◆ right_edge()

Edge_const_descriptor ArrangementOnCurve_1::right_edge ( Vertex_const_descriptor v) const

obtains the descriptor of the right edge of a vertex.

Parameters
vthe vertex.

◆ right_vertex()

Vertex_const_descriptor ArrangementOnCurve_1::right_vertex ( Edge_const_descriptor e) const

obtains the descriptor of the right vertex of an edge.

Parameters
ethe edge.
Precondition
has_right_vertex(e) is true.

◆ split_edge()

Vertex_descriptor ArrangementOnCurve_1::split_edge ( Edge_descriptor e,
const Point_1 & p )

splits the edge e by inserting a new point p inside it.

e becomes the left sub-edge; a new edge becomes the right sub-edge.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.

#include <Concepts/ArrangementOnCurve_1.h>

Definition

Refines
DefaultConstructible
Has models
CGAL::Arrangement_on_curve_1::Arrangement_on_curve_1<GeometryTraits_1, TopologyTraits, BinarySearch>

A model of the concept ArrangementOnCurve_1 can be used to represent a 1D subdivision of a continuous geometric curve (a 1D "master curve" or line space) into alternating vertices and edges, collectively referred to as cells.

The geometry is governed by the GeometryTraits_1 template parameter, which must model the concept AocTraits_1. In particular, any model of the concept GeometryTraits_1 must define the Left_side_category and Right_side_category categories to describe whether the parameter space is open, closed, or identified at each end. When both categories are CGAL::Arrangement_on_curve_1::Identified_side_tag, the curve is cyclic.

Types

typedef unspecified_type Size
 the size type (convertible to size_t).
typedef unspecified_type Point_1
 The 1D arrangement point representation.
typedef unspecified_type Vertex_descriptor
 Descriptor targeting a mutable vertex element.
typedef unspecified_type Edge_descriptor
 Descriptor targeting a mutable edge element.
typedef unspecified_type Vertex_const_descriptor
 Descriptor targeting an immutable vertex element.
typedef unspecified_type Edge_const_descriptor
 Descriptor targeting an immutable edge element.
typedef std::variant< Vertex_descriptor, Edge_descriptor > Location_result
 Represents a point localization result within the 1D curve structure.
typedef std::variant< Vertex_const_descriptor, Edge_const_descriptor > Const_location_result

Boundary Categories

typedef unspecified_type Left_side_category
 Tag type describing the left boundary condition.
typedef unspecified_type Right_side_category
 Tag type describing the right boundary condition.

Accessors

static constexpr bool is_identified
 is true if the curve is cyclic (both Left_side_category and Right_side_category are CGAL::Arrangement_on_curve_1::Identified_side_tag).
bool empty () const
 returns true if the arrangement does not contain any vertices.
Size number_of_vertices () const
 obtains the total count of vertices resting along the carrier curve.
Size number_of_edges () const
 obtains the total number of edges.
auto vertices () const
 obtains an iterator range tracking all constant vertex descriptors.
auto edges () const
 obtains an iterator range tracking all constant edge descriptors.
auto vertex_point_map () const
 obtains an lvalue property map matching vertex descriptors to their coordinate positions.
auto vertex_data_map () const
 obtains an lvalue property map matching vertex descriptors to their extended user attributes.
auto edge_data_map () const
 obtains an lvalue property map matching edge descriptors to their extended user attributes.
Edge_descriptor left_boundary_edge ()
 obtains the descriptor of the leftmost edge.
Edge_const_descriptor left_boundary_edge () const
 obtains the constant descriptor of the leftmost edge.
Edge_descriptor right_boundary_edge ()
 obtains the descriptor of the rightmost edge.
Edge_const_descriptor right_boundary_edge () const
 obtains the constant descriptor of the rightmost edge.
Vertex_const_descriptor left_vertex (Edge_const_descriptor e) const
 obtains the descriptor of the left vertex of an edge.
Vertex_const_descriptor right_vertex (Edge_const_descriptor e) const
 obtains the descriptor of the right vertex of an edge.
Edge_const_descriptor left_edge (Vertex_const_descriptor v) const
 obtains the descriptor of the left edge of a vertex.
Edge_const_descriptor right_edge (Vertex_const_descriptor v) const
 obtains the descriptor of the right edge of a vertex.
bool has_left_vertex (Edge_const_descriptor e) const
 determines whether an edge has a left vertex.
bool has_right_vertex (Edge_const_descriptor e) const
 determines whether an edge has a right vertex.

Modifiers

Vertex_descriptor create_vertex (const Point_1 &p)
 creates a new vertex, enforcing the sorted ordering invariant when BinarySearch is true.
Edge_descriptor create_edge ()
 creates a new edge.
void destroy_vertex (Vertex_descriptor v)
 destroys a given vertex.
void destroy_edge (Edge_descriptor e)
 destroys a given edge.
Vertex_descriptor insert_empty (const Point_1 &p)
 inserts the very first point into an empty arrangement.
Vertex_descriptor insert_before (Vertex_descriptor v, const Point_1 &p)
 inserts a new point p strictly to the left of an existing vertex v.
Vertex_descriptor insert_after (Vertex_descriptor v, const Point_1 &p)
 inserts a new point p strictly to the right of an existing vertex v.
Vertex_descriptor split_edge (Edge_descriptor e, const Point_1 &p)
 splits the edge e by inserting a new point p inside it.
void remove (Vertex_descriptor v)
 removes vertex v from the arrangement.
void clear ()
 clears the arrangement.
void reserve (Size num_vertices)
 reserves storage for num_vertices vertices and the edges between them, so that, in vector mode, no reallocation occurs until the arrangement has more vertices; has no effect in list mode.

Member Typedef Documentation

◆ Left_side_category

Tag type describing the left boundary condition.

Reflects GeometryTraits_1::Left_side_category.

◆ Location_result

Represents a point localization result within the 1D curve structure.

A coordinate query point matches a Vertex_descriptor if it rests on an arrangement vertex, or an Edge_descriptor if it falls inside an edge.

◆ Right_side_category

Tag type describing the right boundary condition.

Reflects GeometryTraits_1::Right_side_category.

Member Function Documentation

◆ has_left_vertex()

bool ArrangementOnCurve_1::has_left_vertex ( Edge_const_descriptor e) const

determines whether an edge has a left vertex.

Parameters
ethe edge.

◆ has_right_vertex()

bool ArrangementOnCurve_1::has_right_vertex ( Edge_const_descriptor e) const

determines whether an edge has a right vertex.

Parameters
ethe edge.

◆ insert_after()

Vertex_descriptor ArrangementOnCurve_1::insert_after ( Vertex_descriptor v,
const Point_1 & p )

inserts a new point p strictly to the right of an existing vertex v.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.

◆ insert_before()

Vertex_descriptor ArrangementOnCurve_1::insert_before ( Vertex_descriptor v,
const Point_1 & p )

inserts a new point p strictly to the left of an existing vertex v.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.

◆ insert_empty()

Vertex_descriptor ArrangementOnCurve_1::insert_empty ( const Point_1 & p)

inserts the very first point into an empty arrangement.

If the parameter space is not identified, the single edge that spans the parameter space is split into the edge to the left of the new vertex v and the edge to the right of v. Otherwise, the single edge becomes a self-loop whose two ends are v.

Parameters
pthe point to insert.

◆ left_boundary_edge()

Edge_descriptor ArrangementOnCurve_1::left_boundary_edge ( )

obtains the descriptor of the leftmost edge.

If the parameter space is identified, this is the edge whose left vertex is the identification vertex, or, if the identification vertex does not exist, the edge that contains the identification point.

◆ left_edge()

Edge_const_descriptor ArrangementOnCurve_1::left_edge ( Vertex_const_descriptor v) const

obtains the descriptor of the left edge of a vertex.

Parameters
vthe vertex.

◆ left_vertex()

Vertex_const_descriptor ArrangementOnCurve_1::left_vertex ( Edge_const_descriptor e) const

obtains the descriptor of the left vertex of an edge.

Parameters
ethe edge.
Precondition
has_left_vertex(e) is true.

◆ remove()

void ArrangementOnCurve_1::remove ( Vertex_descriptor v)

removes vertex v from the arrangement.

If the two edges incident to v are distinct, they are merged into a single edge. Otherwise, v is a boundary vertex of a closed side, or the only vertex of an arrangement on an identified parameter space, and no edge is removed; in the latter case the arrangement becomes empty.

◆ right_boundary_edge()

Edge_descriptor ArrangementOnCurve_1::right_boundary_edge ( )

obtains the descriptor of the rightmost edge.

If the parameter space is identified, this is the edge whose right vertex is the identification vertex, or, if the identification vertex does not exist, the edge that contains the identification point, that is, left_boundary_edge().

◆ right_edge()

Edge_const_descriptor ArrangementOnCurve_1::right_edge ( Vertex_const_descriptor v) const

obtains the descriptor of the right edge of a vertex.

Parameters
vthe vertex.

◆ right_vertex()

Vertex_const_descriptor ArrangementOnCurve_1::right_vertex ( Edge_const_descriptor e) const

obtains the descriptor of the right vertex of an edge.

Parameters
ethe edge.
Precondition
has_right_vertex(e) is true.

◆ split_edge()

Vertex_descriptor ArrangementOnCurve_1::split_edge ( Edge_descriptor e,
const Point_1 & p )

splits the edge e by inserting a new point p inside it.

e becomes the left sub-edge; a new edge becomes the right sub-edge.

Precondition
p lies in the interior of the parameter space; that is, it lies on no closed boundary, and it is not the identification point.