Bentley-Otmann Algorithm 2.0
An implementation of Bentley-Ottmann algorithm in order to count the m,n-cubes
Public Member Functions | Public Attributes
Slope Struct Reference

Slope of a segment line. More...

#include <geometry.hpp>

List of all members.

Public Member Functions

void make (const rat &, const rat &, const rat &, const rat &)
 Initializes a slope.
bool operator< (const Slope &) const
 Defines an order on the slopes.

Public Attributes

slope_t type
 Kind of slope.
rat value
 if type = rational, value of that rational slope

Detailed Description

Slope of a segment line.

Definition at line 93 of file geometry.hpp.


Member Function Documentation

void Slope::make ( const rat &  x0,
const rat &  y0,
const rat &  x1,
const rat &  y1 
)

Initializes a slope.

Parameters:
x0,y0Left endpoint defining the slope
x1,y1Right endpoint defining the slope

Definition at line 41 of file geometry.cpp.

bool Slope::operator< ( const Slope s) const

Defines an order on the slopes.

Parameters:
sSlope to compare with
Returns:
True if and only is current slope less than s

Slope with type 'infty' never are less than any other slope. If rational, the slope is less than an 'infty' one and follows the order on rational numbers for the general case.

Definition at line 61 of file geometry.cpp.


The documentation for this struct was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations