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

Requirements for a Distance Class

A distance class is a class designed to store three points p0, p1 and p2 and to decide which of p1 and p2 is closer to p0. The class is templated by a geometric traits class Gt which is required to provide the Point type and provide a compare() member function defining what closer means.

Types

Gt::Point Point; the point.

Creation

The following constructor creates a distance object. Missing points are not initialized.

Distance<Gt> dt ( Point p0=Point(),
Point p1=Point(),
Point p2=Point(),
Gt* gt = NULL);

Operations

void dt.set_point ( int i, Point pi)
Replaces point i.
Precondition: 0 i 2.
Point dt.get_point ( int i)
Returns point i.
Precondition: 0 i 2.

Comparison_result dt.compare () Compares the distance between p0 and p1 with the distance between p0 and and p2.
Precondition: p1 and p2 are initialized.


Next: Class declaration of Regular_triangulation_2<Gt, Tds>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.