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 compare by angle(const real vector& v1 , const real vector& v2 )<br />

For a non-zero vector v let α(v) be the angle by<br />

which the positive x-axis has to be turned counterclockwise<br />

until it aligns with v. <strong>The</strong> function compares<br />

the angles defined by v1 and v2 , respectively.<br />

<strong>The</strong> zero-vector precedes all non-zero vectors in the<br />

angle-order.<br />

real vector cross product(const real vector& v1 , const real vector& v2 )<br />

4. Implementation<br />

returns the cross product of the three-dimensional<br />

vectors v1 and v2 .<br />

Vectors are implemented by arrays of real numbers. All operations on a vector v take<br />

O(v.dim()) real-number operations, except for dim and [ ] which take constant time. <strong>The</strong><br />

space requirement depends on the size of the representations of the coordinates.

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

Saved successfully!

Ooh no, something went wrong!