\( \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.10 - Kinetic Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Kinetic::Sort< Traits, Visitor > Class Template Reference

#include <CGAL/Kinetic/Sort.h>

Definition

The class Kinetic::Sort maintains a sorted list of objects.

It is the simplest kinetic data structure provided and is a good place to start when looking at the basics of implementing a kinetic data structure.

The Kinetic::SortVisitor can be used to monitor what is happening.

See Also
Kinetic::Ref_counted<T>
Examples:
Kinetic_data_structures/Kinetic_sort.cpp.

Creation

 Sort (Traits tr)
 The basic constructor.
 

Types

typedef unspecified_type Visitor
 The type of the visitor.
 
typedef unspecified_type Vertex_handle
 The handle used to refer to vertex in the sorted list. More...
 
typedef unspecified_type Handle
 A reference counted pointer to be used for storing references to the object.
 
typedef unspecified_type Const_handle
 A reference counted pointer to be used for storing references to the object.
 

Operations

Visitorvisitor ()
 Access the visitor.
 
Traitstraits ()
 Access the traits.
 
Vertex_handle insert (Point_key k)
 Insert the point.
 
void erase (Vertex_handle k)
 Erase the point.
 
void swap (Vertex_handle vh, typename Traits::Kinetic_kernel::Compare_x_1::result_type &s)
 Swap the pair of objects with vh as the first element. More...
 
Iterator begin ()
 Begin iterating through the ordered Vertex_handles (the iterator is convertible to Vertex_handle.
 
Iterator end ()
 End iterating through the ordered Vertex_handles (the iterator is convertible to Vertex_handle.
 

Member Typedef Documentation

template<typename Traits , typename Visitor >
typedef unspecified_type CGAL::Kinetic::Sort< Traits, Visitor >::Vertex_handle

The handle used to refer to vertex in the sorted list.

Derefernecing this returns a Key into the ActiveObjectsTable.

Member Function Documentation

template<typename Traits , typename Visitor >
void CGAL::Kinetic::Sort< Traits, Visitor >::swap ( Vertex_handle  vh,
typename Traits::Kinetic_kernel::Compare_x_1::result_type &  s 
)

Swap the pair of objects with vh as the first element.

The old solver s is used to compute the next root between the two points being swapped. This method is called by an Event object.