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 segment s(const segment& s1 , int prec = rat point :: default precision);<br />

introduces a variable s of type rat segment. s is initialized<br />

to the segment obtained by approximating the two defining<br />

points of s 1 .<br />

4. Operations<br />

segment s.to float( ) returns a floating point approximation of s.<br />

void s.normalize( ) simplifies the homogenous representation by calling<br />

source( ).normalize( ) and target( ).normlize( ).<br />

rat point s.start( ) returns the source point of s.<br />

rat point s.end( ) returns the target point of s.<br />

rat segment s.reversal( ) returns the segment (target( ), source( )).<br />

rational s.xcoord1( ) returns the x-coordinate of the source point of s.<br />

rational s.xcoord2( ) returns the x-coordinate of the target point of s.<br />

rational s.ycoord1( ) returns the y-coordinate of the source point of s.<br />

rational s.ycoord2( ) returns the y-coordinate of the target point of s.<br />

double s.xcoord1D( ) returns a double precision approximation of s.xcoord1 ( ).<br />

double s.xcoord2D( ) returns a double precision approximation of s.xcoord2 ( ).<br />

double s.ycoord1D( ) returns a double precision approximation of s.ycoord1 ( ).<br />

double s.ycoord2D( ) returns a double precision approximation of s.ycoord2 ( ).<br />

integer s.X1( ) returns the first homogeneous coordinate of the source<br />

point of s.<br />

integer s.X2( ) returns the first homogeneous coordinate of the target<br />

point of s.<br />

integer s.Y1( ) returns the second homogeneous coordinate of the source<br />

point of s.<br />

integer s.Y2( ) returns the second homogeneous coordinate of the target<br />

point of s.<br />

integer s.W1( ) returns the third homogeneous coordinate of the source<br />

point of s.

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

Saved successfully!

Ooh no, something went wrong!