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.

int side of halfspace(const rat point& a, const rat point& b, const rat point& c)<br />

returns the sign of the scalar product (b−a)·(c−a). If b ≠ a<br />

this amounts to: Let h be the open halfspace orthogonal to<br />

the vector b−a, containing b, and having a in its boundary.<br />

Returns +1 if c is contained in h, returns 0 is c lies on the<br />

the boundary of h, and returns −1 is c is contained in the<br />

interior of the complement of h.<br />

int side of circle(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

returns +1 if point d lies left of the directed circle through<br />

points a, b, and c, 0 if a,b,c,and d are cocircular, and −1<br />

otherwise.<br />

bool incircle(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

returns true if point d lies in the interior of the circle<br />

through points a, b, and c, and false otherwise.<br />

bool outcircle(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

returns true if point d lies outside of the circle through<br />

points a, b, and c, and false otherwise.<br />

bool on circle(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

returns true if points a, b, c, and d are cocircular.<br />

bool cocircular(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

returns true if points a, b, c, and d are cocircular.<br />

int compare by angle(const rat point& a, const rat point& b, const rat point& c,<br />

const rat point& d)<br />

compares vectors b − a and d − c by angle (more efficient<br />

than calling vector :: compare by angle(b − a, d − x)<br />

on rat vectors).<br />

bool affinely independent(const array& A)<br />

decides whether the points in A are affinely independent.<br />

bool contained in simplex(const array& A, const rat point& p)<br />

determines whether p is contained in the simplex spanned<br />

by the points in A. A may consist of up to 3 points.<br />

Precondition: <strong>The</strong> points in A are affinely independent.<br />

bool contained in affine hull(const array& A, const rat point& p)<br />

determines whether p is contained in the affine hull of the<br />

points in A.

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

Saved successfully!

Ooh no, something went wrong!