31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

at line l.reflect(const rat point& p)<br />

returns l reflected across point p.<br />

rat line l.reverse( ) returns l reversed.<br />

rational l.sqr dist(const rat point& q)<br />

rat segment l.perpendicular(const rat point& p)<br />

returns the square of the distance between l and<br />

q.<br />

returns the segment perpendicular to l with source<br />

p and target on l.<br />

rat point l.dual( ) returns the point dual to l.<br />

Precondition: l is not vertical.<br />

int l.orientation(const rat point& p)<br />

int l.side of(const rat point& p)<br />

bool l.contains(const rat point& p)<br />

computes orientation(a, b, p), where a ≠ b and a<br />

and b appear in this order on line l.<br />

computes orientation(a, b, p), where a ≠ b and a<br />

and b appear in this order on line l.<br />

returns true if p lies on l.<br />

bool l.clip(rat point p, rat point q, rat segment& s)<br />

clips l at the rectangle R defined by p and q. Returns<br />

true if the intersection of R and l is nonempty<br />

and returns false otherwise. If the intersection<br />

is non-empty the intersection is assigned to<br />

s; It is guaranteed that the source node of s is no<br />

larger than its target node.<br />

bool l == const rat line& g returns true if the l and g are equal as oriented<br />

lines.<br />

bool equal as sets(const rat line& l, const rat line& g)<br />

Non-Member Functions<br />

int orientation(const rat line& l, const rat point& p)<br />

int cmp slopes(const rat line& l1 , const rat line& l2 )<br />

returns true if the l and g are equal as unoriented<br />

lines.<br />

computes orientation(a, b, p), where a ≠ b and a<br />

and b appear in this order on line l.<br />

returns compare(slope(l 1 ), slope(l 2 )).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!