\manpage {misc} {} {Some Useful Functions}  
 

The following functions \& macros are defined in $<$LEDA/basic.h$>$.

 
\func  int read\_int {(string\ s)}
           {  prints $s$ and reads an integer from $cin$. }
 
 
\func  double read\_real {(string\ s)}
           {  prints $s$ and reads a real number from $cin$. }
 
 
\func  string read\_string {(string\ s)}
           {  prints $s$ and reads a line from $cin$. }
 
 
\func  char read\_char {(string\ s)}
           {  prints $s$ and reads a character from $cin$. }
 
 
\func  int Yes {(string\ s)}
           {  returns (read\_char($s$) == `y'). }
 
 
\func  float used\_time {()}
           {  returns the currently used cpu time in seconds. }
 
 
\func  float used\_time {(float\&)}
           {  returns the cpu time used by the program from time
           $T$ up to this moment and assigns the current
           time to $T$. }
 
 
\func  void wait {(float\ sec)}
           {  suspends execution for $sec$ seconds. }
 
 

\func void      print\_statistics() { }  
                           {prints a summary of the currently used memory.}

 
\func  T Max {( T\ a, \  T\ b)}
           {  returns the maximum of $a$ and $b$.  }
 
 
\func  T Min {( T\ a, \  T\ b)}
           {  returns the minimum of $a$ and $b$.  }
 
 
