The following functions and macros are defined in < LEDA/basic.htex2html_wrap_inline> .
| int | read_int(string s) | prints s and reads an integer from cin. |
| double | read_real(string s) | prints s and reads a real number from cin. |
| string | read_string(string s) | prints s and reads a line from cin. |
| char | read_char(string s) | prints s and reads a character from cin. |
| int | Yes(string s) | returns (read_char(s) == `y'). |
| bool | get_environment(string var) | |
| returns true if variable var is defined in the current environment and false otherwise. | ||
| bool | get_environment(string var, string& val) | |
| if variable var is defined in the current environment its value is assigned to val and the result is true. Otherwise, the result is false. | ||
| float | used_time() | returns the currently used cpu time in seconds. |
| float | used_time(float& T) | returns the cpu time used by the program from time T up to this moment and assigns the current time to T. |
| void | print_statistics() | prints a summary of the currently used memory. |
| void | leda_wait(float sec) | suspends execution for sec seconds. |
| double | truncate(double x, int k = 10) | |
| returns a double whose mantissa is truncated after k - 1 bits after the binary point, i.e, if
x |
||
| T | leda_min(T a, T b) | returns the minimum of a and b. |
| T | leda_max(T a, T b) | returns the maximum of a and b. |
| void | leda_swap(T& a, T& b) | swaps values of a and b. |