Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Requirements for Random Convex Sets Traits Classes

Definition

A class Traits has to provide the following types and operations in order to qualify as a traits class for random_convex_set_2.

Types

Traits::Point_2
point class.


Traits::FT
class used for doing computations on point and vector coordinates (has to fulfill field type requirements).


Traits::Sum
AdaptableBinaryFunction class: Point_2 × Point_2 Point_2. It returns the point that results from adding the vectors corresponding to both arguments.


Traits::Scale
AdaptableBinaryFunction class: Point_2 × FT Point_2. Scale(p,k) returns the point that results from scaling the vector corresponding to p by a factor of k.


Traits::Max_coordinate
AdaptableUnaryFunction class: Point_2 FT. Max_coordinate(p) returns the coordinate of p with largest absolute value.


Traits::Angle_less
AdaptableBinaryFunction class: Point_2 × Point_2 bool. It returns true, iff the angle of the direction corresponding to the first argument with respect to the positive x-axis is less than the angle of the direction corresponding to the second argument.

Operations

Point_2 t.origin () const return origin (neutral element for the Sum operation).


Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.