Changes
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:56k
开发平台:

MultiPlatform

  1. +==============================================================================+
  2. |        |
  3. |                              LEDA-R 3.2                                      |
  4. |                          RESEARCH VERSION                                    |
  5. |                                                                              |
  6. +==============================================================================+
  7. The new release is mainly a bug-fix release, however it also contains some new 
  8. algorithms for graphs and computational geometry. 
  9. See the "Fixes" file for the list of fixed bugs.
  10. ------------------------------------------------------------------------------
  11. 1. GENERAL CHANGES
  12. ------------------------------------------------------------------------------
  13. SYSTEM DEPENDENT FLAGS
  14. <LEDA/basic.h> has been split into a number of smaller files
  15. The most important is <LEDA/system.h>. Here several flags are
  16. defined indicating particular features or limitations of
  17. compilers. Examples are
  18.          __BUILTIN_BOOL__
  19.          __NEW_SCOPE_RULES__
  20.          __TEMPLATE_FUNCTIONS__
  21.          __EXPLICIT_DESTRUCTION__
  22. The current settings in <LEDA/system.h> have been tested with 
  23. g++-2.5.8, g++-2.6.3, g++-2.7.0, AT&T cfront 2.0.3, sunpro c++ 4.0.1, 
  24. lucid c++ 3.1 , watcom 10.0, zortech 3.1, borland 4.5
  25. IF YOU ARE USING A DIFFERENT COMPILER OR VERSION YOU MAY HAVE TO EDIT THIS FILE.
  26. MACROS
  27. Macros  "forever" and "loop"  are no longer defined
  28. ITERATION
  29. The "forall(x,S)" macro can now be used to iterate over the elements
  30. of arrays and d_arrays.
  31. PARAMETERIZED DATA TYPES
  32. The implementation of parameterized data types (<LEDA/param_types.h>) has 
  33. been rewritten to make it more readable and stable. It now should work with
  34. all c++ compilers supporting function templates. In particular the problems
  35. on 64 bit architectures and the one-word bug have been fixed.
  36. There is no special treatement of handle types anymore.
  37. ------------------------------------------------------------------------------
  38. 2. Data Types
  39. ------------------------------------------------------------------------------
  40. string
  41.              the printf-like string(const char*,...) constructor has been
  42.              rewritten (should work now with all varargs - implementations)
  43. vector/matrix  
  44.              Read & Print with dimensions
  45. integer
  46.              speed of addition/subtraction improved on SPARC
  47. list
  48.              the split operation now has an additional parameter "dir"
  49.              indicating whether the splitting should happen before or after
  50.              the provided item
  51. priority queues
  52.              new data structure: r_heap (redistributive heap)
  53. d_array 
  54.              delete operation:  d_array<I,E>::undefine(I i)
  55. planar_map
  56.              new iteration macro:
  57.              forall_adj_faces(f,v) 
  58.              { "v is successively assigned all faces adjacent to node v" }
  59. random_planar_graph 
  60.              generates connected graphs now
  61. New Graph Algorithms
  62.              MAX_WEIGHT_MATCHING
  63.              MIN_CUT
  64. ------------------------------------------------------------------------------
  65. 3. GEOMETRY
  66. ------------------------------------------------------------------------------
  67. New Operations on (rat_)points and (rat_)segments
  68.              point::rot90
  69.              segment::rot90
  70.              rat_point::rot90
  71.              rat_segment::rot90
  72. geometric primitives (evaluated exactly for rat_ ...):
  73.              orientation(point,point,point)
  74.              left_turn(point,point,point)
  75.              right_turn(point,point,point)
  76.              collinear(point,point,point)
  77.              incircle(point,point,point,point)
  78.              cmp_slopes(segment,segment)
  79.              
  80. Algorithms
  81. void TRIANGULATE_POINTS(list<point> L, GRAPH<point,edge>& G);
  82. void DELAUNAY_TRIANGULATION(const list<point>& L, GRAPH<point,edge>& T);
  83. void DELAUNAY_TRIANGULATION(const list<point>& L, graph& T, 
  84.                                                   node_array<point>& pos,
  85.                                                   edge_array<edge>&  rev);
  86. void DELAUNAY_TRIANGULATION(const list<point>& L, planar_map& T, 
  87.                                                   node_array<point>& pos);
  88. SWEEP_SEGMENTS
  89. The SWEEP_SEGMENTS function has been completely rewritten. It is 
  90. based on the new geometric primitives mentioned above which makes
  91. the code more readable, robust and efficient. This also fixes bugs
  92. in the SEGMENT_INTERSECTION function and the polygon::intersection
  93. method (see also <LEDA>/web/sweep).
  94. +==============================================================================+
  95. |        |
  96. |                             VERSION 3.1                                      |
  97. |                                                                              |
  98. +==============================================================================+
  99. Many changes were made to make LEDA work with new compilers (g++-2.6.3,
  100. Lucid CC, Watcom CC Sunpro CC, ...) and on more platforms (Silicon 
  101. Graphics, IBM, HP, Solaris-2.3, Linux, ...). All reported bugs of version
  102. 3.0 we were able to find and understand have been fixed (see LEDA/Fixes
  103. for a list). Several new data types and algorithms (especially in the graph 
  104. and window section) have been included.
  105. ------------------------------------------------------------------------------
  106.        Changes that might cause unexpected behavior or problems
  107. ------------------------------------------------------------------------------
  108. The following list is not complete, please report all problems to 
  109. leda@mpi-sb.mpg.de
  110. 1. compare, Print, Read, and Hash  
  111.    + there are no predefined versions for pointer types anymore
  112.      so you will receive a run time error "compare undefined"
  113.      when, for example, sorting a list of pointers without having
  114.      defined a compare function for the pointer type.
  115.    + in general, if you use one of these functions before declaring it
  116.      you will receive an error message. Uses can be hidden in instantiations
  117.      of parameterized types. Example:
  118.      list<T>  D;  // here the default error template compare is instantiated.
  119.                   // since list has an operation (sort) that uses compare
  120.   
  121.      int compare(const T&, const T&); // error : compare multiply defined
  122.      dictionary<T,int> D; 
  123.    + a possible bug in g++ :
  124.      if you declare a compare function static and define it later
  125.      in the file, g++ will not use it but will use the default
  126.      template version from <LEDA/param_types.h>.
  127.      Example:
  128.                  class pair {
  129.                  ...
  130.                  };
  131.                  // declaration
  132.                  static int compare(const pair&, const pair&);
  133.                  // use
  134.                  dictionary<pair,int> D;
  135.                  
  136.                  // definition
  137.                  int compare(const pair& p, const pair& q) {  ... }
  138.      Using inline compare functions seems to be a work-around for this problem
  139.      (maybe extern works also ?).
  140. 2. ugraph
  141.    Some of the functionality of ugraphs available in previous versions, e.g., 
  142.    a linear ordering of all adjacent edges, is not supported in the
  143.    current version.
  144. 3. PLANAR(graph&, bool embed=false)
  145.    PLANAR has a different behavior: an embedding is constructed only
  146.    if the optional boolean flag embed is set to true.
  147. 4. random
  148.    There is no LEDA random function any more ( they caused a lot of problems 
  149.    with existing random functions on many systems). Now LEDA contains
  150.    a new data type "random source" for the generation of different
  151.    types of random numbers.
  152. 5. The newly introduced numerical types bigfloat and real might cause problems 
  153.    on several systems. If so, please report ...  You can ignore all compiler 
  154.    error messages if you do not intend to use these types.
  155. ------------------------------------------------------------------------------
  156.                  Fixed Bugs (see also LEDA/Fixes)
  157. ------------------------------------------------------------------------------
  158. - array::operator=  fixed
  159. - graph::read and graph::write
  160. - node_set edge_set rewritten
  161. - int_set: hard coded word size replaced by sizeof-call
  162. - list<T>::sort(cmp_func), ... for types T with sizeof(T) > sizeof(void*)
  163. - array<T>::sort(cmp_func), ... for types T with sizeof(T) > sizeof(void*)
  164. - bug in vector::operator=(const vector&) fixed
  165. - bug in rs_tree (set<T>) copy constructor fixed
  166. - LEDA_MEMORY: operator new & delete now use the size argument 
  167. - array copy constructor fixed
  168. - memory leak in list::assign() fixed
  169. - polygon CONVEX_HULL(list<point>)  new algorithm (Graham's Scan)
  170. - bugs in segment::intersection() and line::intersection() fixed
  171. - bug in binary heaps (negative integer keys) fixed
  172. - UGRAPH::assign(node/edge,...) fixed
  173. - bug in list<node> graph::adj_nodes() (undirected graphs) fixed 
  174. - Iteration (forall_defined) for h_arrays 
  175. - some problems in _leda_panel.c fixed (slider items, buttons, ...)
  176. - multi-definition problem with read_mouse(window, ...) and g++ fixed
  177. - skiplist copy constructor
  178. - memory leaks in leda panels
  179. - nested forall-loops
  180. - string::read now can read strings of arbitrary length
  181. - made dlist::bucket_sort stable 
  182. - memory bug in dp_hash (dynamic perfect hashing) fixed
  183. - k_heap::del_item fixed
  184. - made rs_tree::change_inf (dictionary) clear old and copy new information
  185. - dlist::search (replaced != by call of virtual cmp function)
  186. - fixed bug in queue::append (replaced Convert by Copy)
  187. - bugs in MAX_WEIGHT_BIPARTITE_MATCHING fixed (by M. Paul)
  188. - prio.h: added missing ostream argument cout to Print calls
  189. - stack::push(x)    replaced Convert(x) by Copy(x)
  190. - segment::angle()  now returns zero for segments of length zero
  191. - memory leak in draw_(filled_)polygon fixed
  192. - bug in ab_tree::clear() fixed (forgot to set counter to zero)
  193. - made dlist update operations protected
  194. - missing operation ugraph::read(istream&) inserted
  195.  
  196. --------------------------------------------------------------------------------
  197. NEW FEATURES
  198. --------------------------------------------------------------------------------
  199. Manual Pages
  200.   All manual pages have been incorporated into the corresponding
  201.   header files. There are tools (see LEDA/man/README) to extract and
  202.   typeset the new user manual from these files. A postscript and
  203.   LaTeX version of the manual is available on the ftp server.
  204. Parameterized Data Types
  205.   The  LEDA_TYPE_PARAMERER macro that had to be called for type
  206.   arguments in parameterized data types when using the gg compiler
  207.   is not needed anymore for gg versions $>=$ 2.6.3.
  208. Linear Orders, I/O, and Hashing
  209.   $compare$, $Hash$, $Read$ and $Print$ functions only have to be 
  210.   defined for type parameters of a parameterized data type if they are 
  211.   actually used by operations of the data type. If one of these function 
  212.   is called and has not been defined explicitely, a default version giving
  213.   an error message is instantiated from a function template.
  214.   Except for the built-in types and some basic LEDA types ($string$ and
  215.   $point$) there are no predefined versions of these functions any more.
  216.   In particular, they are not predefined for arbitrary pointer types. 
  217.   You will notice the effect of this change, for instance, when calling 
  218.   the sort operation on a list of pointers $list<T*>$ for
  219.   without a definition of a compare function for $T*$.  Previous LEDA 
  220.   releases sorted the list by increasing addresses of the pointers in 
  221.   this case. In version~3.1 the program will exit with the exception
  222.   ``no compare function defined for $T*$". Operations based on functions
  223.   $Hash$, $Read$, or $Print$ show a similar behavior.
  224. compare, ord, and hash function arguments 
  225.   used e.g. in list::sort, array::sort, list::bucket_sort, ...
  226.   have to use const reference parameters, i.e., have to be of type
  227.   int cmp(const T&, const T&) 
  228.   int ord(const T&)
  229. Nested Forall Loops
  230.    The limitation of previous versions that {bf forall}-loops (e.g.
  231.    on lists) could not be nested is no longer valid.
  232. Graphs
  233. The distinction in directed and undirected graphs is not as strict as
  234. in previous versions. Data type $graph$ represents both directed and
  235. undirected graphs. Directed and undirected graphs only differ in the
  236. definition of adjacent edges or nodes. Now, two lists of edges are 
  237. associated with every node $v$: the list
  238. $out_edges(v) = { e in E | source(e) = v }$ of edges starting in $v$,
  239. and the list $in_edges(v) = { e in E | target(e) = v }$ of
  240. edges ending in $v$. 
  241. A graph is either {em directed} or {em undirected}.
  242. In a directed graph an edge is adjacent to its source and in an undirected
  243. graph it is adjacent to its source and target. In a directed graph a node $w$
  244. is adjacent to a node $v$ if there is an edge $(v,w) in E$; in an undirected
  245. graph $w$ is adjacent to $v$ if there is an edge $(v,w)$ or $(w,v)$ in the
  246. graph.  There are iteration macros allowing to iterate over the list of
  247. starting, ending or adjacent edges (cf. ref{Graphs} for details).
  248. New Data Types
  249. The old priority queue type $priority_queue<K,I>$ caused
  250. a lot of confusion because of the non-standard semantics of the type 
  251. parameters $K$ and $I$ (the meaning of {em key} and {em information} 
  252. was exchanged compared to most text book presentations of priority queues).
  253. To eliminate this confusion we introduced a new priority queue type
  254. $p_queue<P,I>$. Now $P$ is called the priority type of the queue.
  255. The basic library has been extended by several new numerical data types
  256. including an arbitrary length integer type ($integer$), a type of
  257. rational numbers ($rational$), and two filter types $ffloat$ and
  258. $real$ especially useful for floating point computations
  259. in geometric applications.
  260. Note that the temporarily (LEDA-3.1c) introduced data types $node_data$,
  261. $node_stack$, $node_queue$ are no longer available. Please use $node_map$, 
  262. $edge_map$, $stack<node>$ and $queue<node>$ instead.
  263. A list of the new data types:
  264. priority queues        p_queue<P,I>
  265. singly linked lists    slist<T>
  266. big integers           integer
  267. rational numbers       rational
  268. floating point filter  ffloat
  269. real numbers           real
  270. rational point         rat_point
  271. rational segments      rat_segment
  272. maps                   map<I,E>
  273. node and edge maps     node/edge_map<T>
  274. node lists             node_list
  275. bounded node p_queues  b_node_pq<n>
  276. Graph Generators and Algorithms
  277. LEDA now offers more generators for different types of graphs (see 
  278. ref{Graph Generators} for a complete list).
  279. The planarity test $PLANAR$ has been re-implemented and
  280. now has a boolean flag parameter $embed$. An embedding of the graph
  281. is computed only if $embed = true$. A second variant of $PLANAR$
  282. computes a Kuratowsky-subgraph in the case of non-planarity.
  283. A new graph algorithm is $MIN_COST_MAX_FLOW$ computing
  284. a maximal flow with minimal cost. 
  285. Windows and Panels
  286. The window and panel data types  now are base on a plain X11 implementation.
  287. New features include
  288. -- opening more than one window or panel
  289. -- positioning, displaying, and closing of panels and windows
  290. -- changing the label of windows and panels
  291. -- 16 predefined colors
  292. -- accessing colors from the X11 data base by name
  293. -- drawing arcs, arc edges, and arc arrows
  294. -- changing the default fonts, 
  295. -- reading and handling X11 events
  296. -- a simple graph editor (cf. <LEDA/graph_edit.h>)
  297. +==============================================================================+
  298. |        |
  299. |                             VERSION 3.0                                      |
  300. |                                                                              |
  301. +==============================================================================+
  302. LEDA-3.0    (template version)
  303. LEDA-N-3.0  (non-template version)
  304. ------------------------------------------------------------------------------
  305. TEMPLATES & PARAMETERIZED DATA TYPES   (cf. manual, section 1.1)
  306. ------------------------------------------------------------------------------
  307.   
  308. Starting with version 3.0 LEDA is using C++ templates for parameterized 
  309. data types (e.g. dictionary<string,int>). This makes declare macros 
  310. (e.g. declare2(dictionary,string,int)) and the "LEDA_TYPE_PARAMETER" macro 
  311. obsolete. Any built-in, pointer, item, or user-defined class type can be used 
  312. as actual type parameter for a parameterized data type. Class types however 
  313. have to provide the following operations:
  314.   a constructor taking no arguments   T::T()
  315.   a copy constructor                  T::T(const T&)
  316.   a Read function                     void Read(T&, istream&)
  317.   a Print function                    void Print(const T&, ostream&)
  318. A compare function  "int compare(const T&, const T&)" (cf. section 1.4 of the 
  319. user manual) has to be defined if required by the data type.
  320. Currently, the template version can be used with cfront 3.0.1 and g++-2.3.1.
  321. Note however that there are still many bugs in g++-2.3 (most of them should
  322. be fixed in the next version). In particular, there are problems with function
  323. templates that still make the use of the "LEDA_TYPE_PARAMETER" macro necessary 
  324. for non-pointer type parameters.
  325. For compilers not supporting templates there is a non-template variant "LEDA-N"
  326. available whose parameterized data types are based on declare-macros as in
  327. the previous LEDA versions.
  328. See "prog/basic/param.c" for an example.
  329. ------------------------------------------------------------------------------
  330.  IMPLEMENTATION PARAMETERS         (cf. user manual, section 1.2)
  331. ------------------------------------------------------------------------------
  332.    
  333. For many of the parameterized data types (dictionary,priority queue,d_array,
  334. sortseq) there are variants taking an additional data structure parameter 
  335. for choosing a particular implementation, e.g. 
  336. _dictionary<string,int,skiplist>  D 
  337. creates a dictionary D with key type string and information type int 
  338. implemented by the skiplist data structure.
  339. Any such type _XYZ<T1,...,Tk,impl> is derived from the corresponding
  340. "normal" parameterized type XYZ<T1,...,Tk>, i.e., an instance of type 
  341. _XYZ<T1,...,Tk,impl> can be passed as argument to functions with a 
  342. formal parameter of type XYZ<T1,...,Tk>&. This provides a mechanism for
  343. choosing implementations of data types in pre-compiled algorithms.
  344. See "prog/graph/dijkstra.c" for an example.
  345. Language Limitations: 
  346. --------------------
  347. Templates cannot be overloaded (why ?), so we have to use different names. 
  348. The names of data types with implementation parameters start with an 
  349. underscore:
  350. _dictionary<K,I,impl>
  351. _priority_queue<K,I,impl>
  352. _d_array<I,E,impl>
  353. _sortseq<K,I,impl>
  354. Compiler Limitations: 
  355. --------------------
  356. Cfront 3.0.1 does not allow template arguments to be used as base classes.
  357. Therefore, we still have to use the macros from <generic.h> here:
  358. declare3(_dictionary,K,I,impl)        ---->    _dictionary(K,I,impl)
  359. declare3(_priority_queue,K,I,impl)    ---->    _priority_queue(K,I,impl)
  360. declare3(_sortseq,K,I,impl)           ---->    _sortseq(K,I,impl)
  361. declare3(_d_array,I,E,impl)           ---->    _d_array(K,I,impl)
  362. Example Programs:
  363. -----------------
  364. _dictionary<K,I,impl>              prog/dict/dic_test.c
  365. _priority_queue<K,I,impl>          prog/graph/dijkstra.c
  366. _sortseq<K,I,impl>                 prog/plane/seg_int.c
  367. _d_array<K,I,impl>                 prog/dict/d_array_test.c
  368. A data structure "impl" for a data type has to provide a certain 
  369. set of operations and to use certain virtual functions for type 
  370. dependent operations (cf. manual, section 9). 
  371. Sample header files for implementations of dictionaries, priority_queues, 
  372. and sorted sequences can be found in <LEDA/impl/dic_impl.h>,
  373. <LEDA/impl/prio_impl.h>, <LEDA/impl/seq_impl.h>.
  374. ------------------------------------------------------------------------------
  375. LINEAR ODERS
  376. ------------------------------------------------------------------------------
  377. There is a new mechanism for deriving differently ordered type variants from
  378. a data type. 
  379. The macro call
  380.          DEFINE_LINEAR_ORDER(T,cmp,T1)  
  381. introduces a new type T1 equivalent to type T with the linear order
  382. defined by the compare function "cmp".
  383. Examples:   prog/basic/order.c
  384.             prog/plane/order.c
  385.   
  386. ------------------------------------------------------------------------------
  387.  GENERAL
  388. ------------------------------------------------------------------------------
  389. "forall_xyz_items" no longer supported, use "forall_items"  
  390. ------------------------------------------------------------------------------
  391. Efficiency
  392. ------------------------------------------------------------------------------
  393. The efficiency of many data types and algorithms has been improved.
  394. In particular:
  395. sorting  (array::sort, list::sort)
  396. dictionaries, sets, d_arrays, sorted sequences 
  397. (now implemented by randomized search trees)
  398. network algorithms:
  399. matching, minimum spanning tree  (performance improved by a start heuristic)
  400. Macro LEDA_CHECKING_OFF: 
  401. turns off range checking for arrays and  node/edge_arrays
  402. (has to be defined before including LEDA header files)
  403. ------------------------------------------------------------------------------
  404.  Graphs
  405. ------------------------------------------------------------------------------
  406. new operations:
  407. node G.first_node()         
  408. node G.last_node()
  409. node G.succ_node(node)
  410. node G.pred_node(node)
  411. edge G.first_edge()
  412. edge G.last_edge()
  413. edge G.succ_edge(edge)
  414. edge G.pred_edge(edge)
  415. void G.make_undirected()  inserts all edges (v,w) into the adjacency list of w
  416.                           i.e. both outgoing and incoming edges are traversed
  417.                           by forall_adj_edges
  418. void G.make_directed()    removes all incoming edges from the adjacency lists
  419.               
  420. void graph_edit(window& W, GRAPH<point,int>& G) 
  421. cmdline_graph(graph& G, int argc, char** argv)
  422.         builds a graph according to the command line arguments 
  423.      
  424.         command line:  <prog>        ---> test_graph()
  425.                        <prog> n      ---> complete graph with n nodes
  426.                        <prog> n m    ---> random graph with n nodes and m edges
  427.                        <prog> file   ---> read graph from "file"
  428.      
  429. --------------------------------------------------------------------------------
  430. planar_map (PLANAR_MAP)
  431. --------------------------------------------------------------------------------
  432. edge  P.split_edge(edge e)
  433. edge  P.split_edge(edge e, vtype x)
  434.       splits edge e and its reversal by introducing a new node u
  435. node  p.new_node(face f)
  436. node  p.new_node(face f, vtype x)
  437.       splits face f into triangles by introducing a new node u
  438.       and connecting it to all nodes of f
  439. node  p.new_node(list<edge> el)
  440. node  p.new_node(list<edge> el, vtype x)
  441.       splits face bounded by the edges in el by introducing a new node u
  442.       and connecting it to all source nodes of edges in el
  443. ------------------------------------------------------------------------------
  444.  node_pq<I>
  445. ------------------------------------------------------------------------------
  446. I    PQ.inf(node v)               returns information of node v
  447. bool PQ.member(node v)            true if v in PQ false otherwise
  448. ------------------------------------------------------------------------------
  449.  STRING
  450. ------------------------------------------------------------------------------
  451. additional constructor    
  452. string::string(char c)        creates the one-character string "c"
  453. ------------------------------------------------------------------------------
  454.  MEMORY
  455. ------------------------------------------------------------------------------
  456. LEDA_MEMORY_WITH_CHECK
  457. A debug version of the LEDA_MEMORY macro (cf. manual, section 7.3), gives
  458. an error message if the same pointer is deleted twice (slow!).
  459. ------------------------------------------------------------------------------
  460. Directory Structure
  461. ------------------------------------------------------------------------------
  462. a) All implementation header files have been moved to a new header subdirectory
  463.    <LEDA/impl>.
  464. b) There is a new directory "util" containing some utility programs. Currently 
  465.    it contains a ksh variant of the Lman shell script, a program for shortening 
  466.    all file names to 15 characters (required by SCO UNIX/XENIX) and some DOS 
  467.    installation batch files.
  468. +==============================================================================+
  469. |        |
  470. |                           VERSION 2.2.2         |
  471. |                                                                              |
  472. +==============================================================================+
  473. minor changes for use with g++-2.2 and some bugs fixed 
  474. +==============================================================================+
  475. |        |
  476. |                           VERSION 2.2.1         |
  477. |                                                                              |
  478. +==============================================================================+
  479. Some changes made for use with g++-2.1 and libg++-2.0
  480. Some bugs fixed : 
  481. string::operator+ 
  482. matrix::operator=
  483. matrix::triang 
  484. GRAPH::assign
  485.  ...
  486. +==============================================================================+
  487. |        |
  488. |                           VERSION 2.2.0         |
  489. |                                                                              |
  490. +==============================================================================+
  491. --------------------------------------------------------------------------------
  492. Parameterized data types
  493. --------------------------------------------------------------------------------
  494. Now, arbitrary data types (not only pointer and simple types) can be used as 
  495. type parameters. This makes data type "real" obsolete (use "double" or "float" 
  496. instead), "real" is no longer included in the header file <LEDA/basic.h> but 
  497. is still available in <LEDA/real.h>.
  498. Rules for type parameters:
  499. --------------------------
  500. 1. Build-in types (char,int,long,float,double), pointer types, and LEDA 
  501.    simple types can be used as type parameters.
  502. 2. A class type T can be used as type parameter under the following conditions:
  503.    a) The following operations and functions must be defined for T
  504.       a constructor without arguments:  T::T()
  505.       an input operator:                istream& operator>>(istream&,T&)
  506.       an output operator:               ostream& operator<<(ostream&,const T&)
  507.       a compare function:               int compare(const T&, const T&)
  508.    b) The macro call 
  509.                       LEDA_TYPE_PARAMETER(T) 
  510.       must appear before the first use of T as actual type parameter.
  511.    c) If defined, destructor and copy constructor are used for copying and 
  512.       destroying objects.
  513. See "<LEDA>/prog/basic/param.c" for an example and for more informations and 
  514. implementaion details: "S. N"aher: Parameterized data types in LEDA", in 
  515. preparation.
  516. --------------------------------------------------------------------------------
  517. simple data types 
  518. --------------------------------------------------------------------------------
  519. Data type "real" is no longer supported (it is still available in <LEDA/real.h>)
  520. All parameters of type real have been replaced by double parameters. When
  521. reading the user manual take "real" as a synonym for "double".
  522. --------------------------------------------------------------------------------
  523. graph
  524. --------------------------------------------------------------------------------
  525. read & write overloaded for streams
  526. int  G.read(istream I)     reads compressed representation of G from I
  527.                            returns  ... (see manual)
  528. int  G.read(string file)   reads compressed representation of G from file
  529.                            returns  ... (see manual)
  530. void G.write(ostream O)    writes compressed representation of G to O
  531. void G.write(string file)  writes compressed representation of G to file
  532. --------------------------------------------------------------------------------
  533. graph algorithms
  534. --------------------------------------------------------------------------------
  535. bool PLANAR(graph& G)   
  536.                  Planarity test: returns true iff $G$ is planar.
  537.                  If G is planar, it is transformed into a planar map by 
  538.                  rearranging the adjaceny lists
  539.                  precondition:  G is biconnected
  540. int BICONNECTED_COMPONENTS(ugraph& G, edge_array(int)& compnum)
  541.                  computes the biconnected components of the undirected graph G
  542.                  returns the number of biconnected components and in 
  543.                  edge_array(int) compnum for each edge an integer with
  544.                  compnum[x]=compnum[y] iff edge x and y belong to the same 
  545.                  biconnected component and 0 <= compnum[e]<=m-1 for all edges e
  546. --------------------------------------------------------------------------------
  547. window
  548. --------------------------------------------------------------------------------
  549. int  W.get_button()         non-blocking mouse read operation
  550.                             returns number of button (see read_mouse)
  551.                             if a button has been pressed and 0 otherwise
  552. void W.set_frame_label(string label)
  553.                             makes string "label" the window frame label
  554. --------------------------------------------------------------------------------
  555. Memory Management:
  556. --------------------------------------------------------------------------------
  557. Macro for making LEDA's memory managment available for user-defined data types
  558. LEDA_MEMORY(type)     defines new & delete operators for "type" allocating and 
  559.                       deallocating memory by LEDA's internal memory manager
  560. Example: class 3d_point 
  561.          { 
  562.            double x,y,z;
  563.          
  564.            public: ...
  565.          
  566.            LEDA_MEMORY(3d_point)
  567.           };
  568. Two functions for returning memory allocated by the LEDA memory manager to 
  569. the system.
  570. void memory_clear()       frees all currently not used memory blocks
  571. void memory_kill()        frees all memory blocks regardless
  572.                           if they are still in use or not
  573. --------------------------------------------------------------------------------
  574. New header files:
  575. --------------------------------------------------------------------------------
  576. The basic two-dimensional data types point, segment, line, circle, polygon,
  577. and the 2d algorithms can be used separately by including the corresponding 
  578. header files. The stream data types (file_istream, file_ostream, ...) are no 
  579. longer included in <LEDA/basic.h> but are still available in <LEDA/stream.h>
  580. --------------------------------------------------------------------------------
  581. Libraries:
  582. --------------------------------------------------------------------------------
  583. The window library libWx.a (-lWx) or libWs.a (-lWs) now must appear
  584. after the plane library libP.a (-lP) on the compiler/linker command line.
  585. For example:
  586.      CC prog.c -lP -lG -lL -lWx -lxview -lolgx -lX11 -lm
  587. or
  588.      CC prog.c -lP -lG -lL -lWs -lsuntools -lsunwindow -lpixrect -lm
  589. +==============================================================================+
  590. |        |
  591. |                           VERSION 2.1.1         |
  592. |                                                                              |
  593. +==============================================================================+
  594. --------------------------------------------------------------------------------
  595. vector/matrix
  596. --------------------------------------------------------------------------------
  597. 1. Assignment (=) and  comparison (==/!=) operators now can be applied to
  598.    vectors/matrices with different dimensions.
  599. 2. The default initialization for arrays of vectors/matrices is the
  600.    vector/matrix of dimension 0.
  601. 3. Problems with vector/matrix type parameters fixed.
  602. --------------------------------------------------------------------------------
  603. graphics
  604. --------------------------------------------------------------------------------
  605. graph_edit(window W, GRAPH(point,int) G, bool directed = true);
  606.         Graph editor, edges are represented by arrows if directed = true
  607.         and by segments if directed = false
  608.         (declaration in <LEDA/graph_edit.h>)
  609.         see example program "prog/graphics/matching.c" for details.
  610. --------------------------------------------------------------------------------
  611. string
  612. --------------------------------------------------------------------------------
  613. string(const char*, ...)               new printf/form - like constructor
  614.                                        e.g.  s = string("x = %5.2f",x);
  615. --------------------------------------------------------------------------------
  616. graph algorithms
  617. --------------------------------------------------------------------------------
  618. list(edge) MAX_CARD_MATCHING(graph G) 
  619.                               Maximum cardinality matching for general graphs,
  620.                               implemented by Edmond's Algorithm, returns list
  621.                               of matched edges.
  622.                               (source in  "src/graph_alg/_mc_matching.c")
  623.                 
  624.                               (worst-case running time  O(n*m) )
  625.                 
  626. +==============================================================================+
  627. |        |
  628. |                           VERSION 2.1.0         |
  629. |                                                                              |
  630. +==============================================================================+
  631. --------------------------------------------------------------------------------
  632.         !!!!!!!!!!!!  CHANGES IN HEADER FILES  !!!!!!!!!!!!!!!!!!
  633. --------------------------------------------------------------------------------
  634. I. <LEDA/graph.h> 
  635. Header file <LEDA/graph.h> has been split into  
  636. <LEDA/graph.h>            : graph, GRAPH, node_array, edge_array
  637. <LEDA/ugraph.h>           : ugraph, UGRAPH
  638. <LEDA/planar_map.h>       : planar_map, PLANAR_MAP
  639. <LEDA/graph_alg.h>        : graph algorithms + predefined node/edge array types
  640.                             node_array(int)   edge_array(int)
  641.                             node_array(edge)  edge_array(edge)
  642.                             node_array(bool)  edge_array(bool);
  643.                             node_array(real)  edge_array(real)
  644.                             node_matrix(bool)
  645.                             node_matrix(int)
  646.                             node_matrix(real)
  647. <LEDA/node_set.h>         : node_set
  648. <LEDA/edge_set.h>         : edge_set
  649. <LEDA/node_partition.h>   : node_partition
  650. <LEDA/node_pq.h>          : node_pq
  651. --------------------------------------------------------------------------------
  652. II. <LEDA/plane.h> 
  653. Header file <LEDA/plane.h> has been split into  
  654. <LEDA/plane.h>      : basic geometric objects (point,segment, ...) and 
  655.                       predefined types list(point), list(segment), ...
  656. <LEDA/plane_alg.h>  : plane algorithms, predefined type GRAPH(point,point)
  657. --------------------------------------------------------------------------------
  658. --------------------------------------------------------------------------------
  659. data type "string"
  660. --------------------------------------------------------------------------------
  661.  
  662. int       s.pos (string s_1, int i ) 
  663.  
  664.                       returns the first position of s_1 in s right of  
  665.                       position i (-1 if no such position exists)  
  666.  
  667. string    s.insert (string s_1, int i ) 
  668.  
  669.                       returns s(0,i-1) + s_1 + s(i+1,s.length())  
  670.                       Precondition:0 <= i <= s.length()-1  
  671.  
  672. string    s.replace (string s_1, string s_2, int i=1 ) 
  673.  
  674.                       returns the string created from s by replacing  
  675.                       the i-th occurence of s_1 in s by s_2  
  676.  
  677. string    s.replace_all (string s_1, string s_2 ) 
  678.  
  679.                       returns the string created from s by replacing  
  680.                       all occurences of s_1 in s by s_2  
  681.  
  682. string    s.replace (int i, int j, string s_1 ) 
  683.  
  684.                       returns the string created from s by replacing  
  685.                       s(i,j) by s_1  
  686.  
  687. string    s.replace (int i, string s_1 ) 
  688.  
  689.                       returns the string created from s by replacing  
  690.                       s[i] by s_1  
  691.  
  692. string    s.del (string s_1, int i=1 ) 
  693.  
  694.                       returns s.replace(s_1,"",i)  
  695.  
  696. string    s.del_all (string s_1 ) 
  697.  
  698.                       returns s.replace_all(s_1,"")  
  699.  
  700. string    s.del (int i, int j ) 
  701.  
  702.                       returns s.replace(i,j,"")  
  703.  
  704. string    s.del (int i ) 
  705.  
  706.                       returns s.replace(i,"")  
  707.  
  708. void      s.read (istream I, char delim = ' ' ) 
  709.  
  710.                       reads characters from input stream I into s  
  711.                       until the first occurence of character delim  
  712.  
  713. void      s.read (char delim = ' ' ) 
  714.  
  715.                       read(cin,delim)  
  716.  
  717. void      s.readline (istream I ) 
  718.  
  719.                       read(I,'n')  
  720.  
  721. void      s.readline () 
  722.  
  723.                       readline(cin)  
  724. --------------------------------------------------------------------------------
  725. matrix
  726. --------------------------------------------------------------------------------
  727. Operations   matrix matrix::inv()                O(n^3)
  728.              vector matrix::solve(vector)        O(n^2)
  729.              double matrix::det()                O(n^2)
  730. are now implemented by Gaussian eliminiation.
  731. matrix M.solve(matrix A)    solves  M*x_i = b_i simultaneously for all 
  732.                             columns b_i of A, returns matrix (x_0,...,x_n-1)
  733.                             Preconditions: a) M is quadratic 
  734.                                            b) A.dim2() = M.dim1()
  735. --------------------------------------------------------------------------------
  736. list
  737. --------------------------------------------------------------------------------
  738. list_item  L[int i]        returns i-th item (nil if i<0 or i>L.length()-1)
  739.                            cost: O(i)
  740. --------------------------------------------------------------------------------
  741. sortseq
  742. --------------------------------------------------------------------------------
  743. void      S.split (seq_item it, sortseq& S_1, sortseq& S_2 ) 
  744.  
  745.                       splits S at item it into sequences S_1 and S_2  
  746.                       and makes S empty. More precisely, if  
  747.                       S = x_1,...,x_k-1,it,x_k+1,...,x_n then  
  748.                       S1 = x_1,...,x_k-1,it and S2 = x_k+1,...,x_n  
  749.                       Precondition: it is an item in S.  
  750.  
  751. sortseq&  S.conc (sortseq& S_1 ) 
  752.  
  753.                       appends S_1 to S, makes S_1 empty, and returns S.
  754.                       Precondition: S.key(S.max()) <= S_1.key(S_1.min()).  
  755. --------------------------------------------------------------------------------
  756. graph  G
  757. --------------------------------------------------------------------------------
  758. void      G.sort_nodes (node_array(T) A ) 
  759.  
  760.                       the nodes of G are sorted according to the  
  761.                       entries of node_array A (cf. section 5.7)  
  762.                       Precondition: T must be linearly ordered  
  763.  
  764. void      G.sort_edges (edge_array(T) A ) 
  765.  
  766.                       the edges of G are sorted according to the  
  767.                       entries of edge_array A (cf. section 5.7)  
  768.                       Precondition: T must be linearly ordered  
  769. pretty printing:
  770. void      G.print(string s, ostream O)
  771. void      G.print(string s)
  772. void      G.print(ostream O)
  773. void      G.print()
  774. void      G.print_node(node v, ostream O = cout)
  775. void      G.print_edge(edge e, ostream O = cout)
  776. --------------------------------------------------------------------------------
  777. GRAPH(vtype,etype)  G
  778. --------------------------------------------------------------------------------
  779. void      G.sort_nodes () 
  780.  
  781.                       the nodes of G are sorted according to their  
  782.                       informations. Precondition: vtype is linearly  
  783.                       ordered.  
  784.  
  785. void      G.sort_edges () 
  786.  
  787.                       the edges of G are sorted according to their  
  788.                       informations. Precondition: etype is linearly  
  789.                       ordered.  
  790. --------------------------------------------------------------------------------
  791. node/edge_array
  792. --------------------------------------------------------------------------------
  793. Creation of a node array (edge array)::
  794. a) ...
  795. b) ...
  796. c) ...
  797. d) node/edge_array(E)  A(graph G, int n, E x)    array for n nodes/edges of G
  798.                                                  Precondition: n >= |V| (|E|)
  799. +==============================================================================+
  800. |        |
  801. |                           VERSION 2.0.1        |
  802. |                                                                              |
  803. +==============================================================================+
  804. --------------------------------------------------------------------------------
  805. GENERAL
  806. --------------------------------------------------------------------------------
  807. forall_items(x,...)    can be used for all kinds of items
  808. Read and Write functions for user defined I/O (cf. User Manual, section 1.5)
  809. must have an additional stream argument: 
  810.                    Read(T&, istream&)
  811.                    defines an input function for reading objects of type T 
  812.                    from an input stream.
  813.                    Write(T&,ostream&)
  814.                    defines an output function for printing objects of type T 
  815.                    to an output stream.
  816. --------------------------------------------------------------------------------
  817. string (section 2.3)
  818. --------------------------------------------------------------------------------
  819. string  s.tail(int i)       returns the last  i characters of s
  820. string  s.head(int i)       returns the first i characters of s
  821. --------------------------------------------------------------------------------
  822. array (section 3.1)
  823. --------------------------------------------------------------------------------
  824.  
  825. void     A.sort (int (*cmp)(E&, E&), int l, int h ) 
  826.  
  827.                       applies the sorting operation to the sub-array  
  828.                       [l..h].  
  829.  
  830. void     A.read (istream I ) 
  831.  
  832.                       reads b-a+1 objects of type E from the input  
  833.                       stream I into the array A using the overloaded  
  834.                       Read function (section 1.5)  
  835.  
  836. void     A.read () 
  837.  
  838.                       Calls A.read(cin) to read A from  
  839.                       the standard input stream cin.  
  840.  
  841. void     A.read (string s ) 
  842.  
  843.                       As above, but uses string s as a prompt.  
  844.  
  845. void     A.print (ostream O, char space = ' ' ) 
  846.  
  847.                       Prints the contents of array A to the output  
  848.                       stream O using the overload Print function  
  849.                       (section 1.5) to print each element. The elements  
  850.                       are separated by the space character space.  
  851.  
  852. void     A.print (char space = ' ' ) 
  853.  
  854.                       Calls A.print(cout, space) to print A on  
  855.                       the standard output stream cout.  
  856.  
  857. void     A.print (string s, char space = ' ' ) 
  858.  
  859.                       As above, but uses string s as a header.  
  860.  
  861. --------------------------------------------------------------------------------
  862. list  (section 3.7)
  863. --------------------------------------------------------------------------------
  864.  
  865. void     L.read (istream I, char delim = 'n' ) 
  866.  
  867.                       reads a sequence of objects of type E terminated  
  868.                       by the delimiter delim from the input stream I  
  869.                       using the overloaded Read function (section 1.5)  
  870.                       L is made a list of appropriate length and the  
  871.                       sequence is stored in L.  
  872.  
  873. void     L.read (char delim = 'n' ) 
  874.  
  875.                       Calls L.read(cin, delim) to read L from  
  876.                       the standard input stream cin.  
  877.  
  878. void     L.read (string s, char delim = 'n' ) 
  879.  
  880.                       As above, but uses string s as a prompt.  
  881.  
  882. void     L.print (ostream O, char space = ' ' ) 
  883.  
  884.                       Prints the contents of list L to the output  
  885.                       stream O using the overload Print function  
  886.                       (section 1.5) to print each element. The elements  
  887.                       are separated by the space character space.  
  888.  
  889. void     L.print (char space = ' ' ) 
  890.  
  891.                       Calls L.print(cout, space) to print L on  
  892.                       the standard output stream cout.  
  893.  
  894. void     L.print (string s, char space = ' ' ) 
  895.  
  896.                       As above, but uses string s as a header.  
  897.  
  898.  
  899. void     L.write (string fname ) 
  900.  
  901.                       writes G to the file with name fname. The  
  902.                       overloaded functions Print(vtype,ostream)  
  903.                       and Print(etype,ostream) (cf. section 1.6)  
  904.                       are used to write the node and edge entries  
  905.                       of G respectively.  
  906.  
  907. void     L.read (string fname ) 
  908.  
  909.                       reads G from the file with name fname. The  
  910.                       overloaded functions Read(vtype,istream)  
  911.                       and Read(etype,istream) (cf. section 1.6)  
  912.                       are used to read the node and edge entries  
  913.                       of G respectively.  
  914. --------------------------------------------------------------------------------
  915. priority_queue  (section 4.1)
  916. --------------------------------------------------------------------------------
  917. Operation del_min has been overloaded
  918. K    del_min()
  919. void del_min(K& k, I& i)
  920.                       removes an item x with minimal information
  921.                       assigns key(x) to k and inf(x) to i.
  922. --------------------------------------------------------------------------------
  923. sortseq  (section 4.6)
  924. --------------------------------------------------------------------------------
  925. Operations "succ" and "pred" have been overloaded:
  926. seq_item  S.succ(seq_item x)
  927. seq_item  S.succ(K k)
  928. seq_item  S.pred(seq_item x)
  929. seq_item  S.pred(K k)
  930.  
  931.  
  932. NEW DATA TYPE:
  933. --------------------------------------------------------------------------------
  934. 4.7 Persistent Dictionaries (p_dictionary)
  935. --------------------------------------------------------------------------------
  936. 1. DEFINITION
  937. The difference between dictionaries (cf. section~4.3) and persistent 
  938. dictionaries lies in the fact that update operations performed 
  939. on a persistent dictionary D do not change D but create and return a 
  940. new dictionary D'. For example, D.del(k) returns the dictionary D' 
  941. containing all items it of D with key(it) != k. 
  942. An instance D of the data type p_dictionary is a set of items (type 
  943. p_dic_item). Every item in D contains a key from a linearly ordered 
  944. data type K, called the key type of D, and an information from a data 
  945. type I, called the information type  of D. The number of items in D 
  946. is called the size of D. A dictionary of size zero is called empty. 
  947. We use <k,i> to denote an item with key k and information 
  948. i (i is said to be the information associated with key k).  For each 
  949. k in K there is at most one item <k,i> in D.
  950.  
  951. 2. DECLARATION
  952. declare2(p_dictionary,K,I)
  953. introduces a new data type with name p_dictionary(K,I) consisting of all 
  954. persistent dictionaries with key type K and information type I.
  955. precond K is linearly ordered.
  956.  
  957. 3. CREATION
  958. p_dictionary(K,I) D ;
  959. creates an instance D of type p_dictionary(K,I) and initializes D to an 
  960. empty persistent dictionary. 
  961.  
  962. 4. OPERATIONS
  963. K         D.key (dic_item it ) 
  964.  
  965.                       returns the key of item it.  
  966.                       Precondition: it in D.  
  967.  
  968. I         D.inf (dic_item it ) 
  969.  
  970.                       returns the information of item it.  
  971.                       Precondition: it in D.  
  972.  
  973. dic_item  D.lookup (K k ) 
  974.  
  975.                       returns the item with key k (nil if  
  976.                       no such item exists in D).  
  977.  
  978. I         D.access (K k ) 
  979.  
  980.                       returns the information associated with key k  
  981.                       Precondition: there is an item with  
  982.                       key k in D.  
  983.  
  984. p_dictionary(K,I) D.del (K k ) 
  985.  
  986.                       returns { x in D | key(x) != k }.  
  987.  
  988. p_dictionary(K,I) D.del_item (dic_item it ) 
  989.  
  990.                       returns { x in D | x != it }.  
  991.  
  992. p_dictionary(K,I) D.insert (K k, I i ) 
  993.  
  994.                       returns D.del(k) cup {<k,i>}.  
  995.  
  996. p_dictionary(K,I) D.change_inf (dic_item it, I i ) 
  997.  
  998.                       Let k = key(it), returns D.del_item(it) cup  
  999.                       {<k,i>}. Precondition: it in D.  
  1000.  
  1001. p_dictionary(K,I) D.clear () 
  1002.  
  1003.                       returns an empty persistent dictionary.  
  1004.  
  1005. bool      D.empty () 
  1006.  
  1007.                       returns true if D is empty, false otherwise.  
  1008.  
  1009. int       D.size () 
  1010.  
  1011.                       returns the size of D.  
  1012.  
  1013. 5. ITERATION
  1014. forall_items(i,D) 
  1015. { ``the items of D are successively assigned to i '' }
  1016.  
  1017. 6. IMPLEMENTATION
  1018. Persistent Dictionaries are implemented by leaf oriented 
  1019. persistent red black trees (cf. [DSST89]).
  1020. Operations insert, lookup, del_item, del take time O(log n), key, inf, 
  1021. empty, size, change_inf and clear take time O(1). The space requirement 
  1022. is O(n). Here n is the number of all created persistent dictionaries (= number 
  1023. of all performed update operations). 
  1024.  
  1025. --------------------------------------------------------------------------------
  1026. GRAPH    (section 5.4)
  1027. --------------------------------------------------------------------------------
  1028.  
  1029.  
  1030. void      G.write (string fname ) 
  1031.  
  1032.                       writes G to the file with name fname. The  
  1033.                       overloaded functions Print(vtype,ostream)  
  1034.                       and Print(etype,ostream) (cf. section 1.6)  
  1035.                       are used to write the node and edge entries  
  1036.                       of G respectively.  
  1037.  
  1038. int       G.read (string fname ) 
  1039.  
  1040.                       reads G from the file with name fname. The  
  1041.                       overloaded functions Read(vtype,istream)  
  1042.                       and Read(etype,istream) (cf. section 1.6)  
  1043.                       are used to read the node and edge entries  
  1044.                       of G respectively. Returns error code
  1045.                       1  if file fname does not exist
  1046.                       2  if graph is not of type GRAPH(vtype,etype)
  1047.                       3  if file fname does not contain a graph
  1048.                       0  otherwise.
  1049.  
  1050.  
  1051. --------------------------------------------------------------------------------
  1052. PLANE  (section 6.1.6)
  1053. --------------------------------------------------------------------------------
  1054. Function VORONOI  (cf. section 6.1.6) has a new interface:
  1055. void VORONOI(list(point), double R, GRAPH(point,point) )
  1056.         VORONOI takes as input a list of points  sites and a real number 
  1057.         R. It computes a directed graph G representing the planar subdivision
  1058.         defined by the Voronoi-diagram of sites where all ``infinite" edges have
  1059.         length R. For each node v G.inf(v) is the corresponding Voronoi 
  1060.         vertex (point) and for each edge e  G.inf(e) is the site (point) 
  1061.         whose Voronoi region is bounded by e. 
  1062. --------------------------------------------------------------------------------
  1063. point_set  (section 6.3)
  1064. --------------------------------------------------------------------------------
  1065.  
  1066. list(ps_item) S.convex_hull () 
  1067.  
  1068.                       returns the list of items containing  
  1069.                       all points of the convex hull of  
  1070.                       in clockwise order.  
  1071.  
  1072. --------------------------------------------------------------------------------
  1073. graphic windows  (section 6.7)
  1074. --------------------------------------------------------------------------------
  1075. Data type gwindow no longer exists, it is replaced by data type window
  1076. The data type window provides an interface for the input and 
  1077. output of basic two-dimensinal geometric objects (cf. section 5.1) 
  1078. using the X11 (xview) or SunView window system.
  1079. There are two object code libraries (libWs.a, libWx.a) containing 
  1080. implementations for different environments. Application programs using data 
  1081. type window have to be linked with one of these libraries (cf. section~1.6):
  1082. a) For the SunView window system:
  1083.    CC prog.c -lWs -lP -lG -lL -lm  -lsuntool -lsunwindow -lpixrect
  1084. b) For the X11 (open windows) window system:
  1085.    CC prog.c -lWx -lP -lG -lL -lm  -lxview -lolgx -lX11 
  1086. --------------------------------------------------------------------------------
  1087. Creation of a graphic window
  1088. --------------------------------------------------------------------------------
  1089. a) window W(int xpix, int ypix, int xpos, int ypos);
  1090. b) window W(int xpix, int ypix);
  1091. c) window W();
  1092. Variant a) creates a window W of physical size xpix times ypix pixels 
  1093. with its upper left corner at position (xpos,ypos) on the screen,
  1094. variant b) places W into the upper right corner of the screen, and
  1095. variant c) creates a 850 times 850 pixel window positioned into the
  1096. upper right corner.
  1097. All three variants initialize the coordinates of W to x0 = 0,
  1098. x1 = 100 and y0 = 0. The init operation (see  below) can later 
  1099. be used to change the window coordinates and scaling.
  1100. --------------------------------------------------------------------------------
  1101. Additional operations
  1102. --------------------------------------------------------------------------------
  1103.  
  1104.  
  1105. int       W.read_panel (string h, int n, string* S ) 
  1106.  
  1107.                       displays a panel with header h and an array S[n]  
  1108.                       of n string buttons, returns the index of the selected  
  1109.                       button.  
  1110. int       W.read_vpanel (string h, int n, string* S ) 
  1111.  
  1112.                       read_panel with vertical button layout
  1113.  
  1114.  
  1115. int       W.read_int (string p ) 
  1116.  
  1117.                       displays a panel with prompt p for integer input,  
  1118.                       returns the input  
  1119.  
  1120. real      W.read_real (string p ) 
  1121.  
  1122.                       displays a panel with prompt p for real input  
  1123.                       returns the input  
  1124.  
  1125. string    W.read_string (string p ) 
  1126.  
  1127.                       displays a panel with prompt p for string input,  
  1128.                       returns the input  
  1129.  
  1130.         
  1131. string    W.read_string (string p, list(string) menu)
  1132.                       as above, adds an additional menu button which
  1133.                       can be used to select a string from menu.
  1134.      
  1135. string    W.read_string (string p, string label, list(string) menu)
  1136.                       as above, the menu button is labelled with label.
  1137. --------------------------------------------------------------------------------
  1138. PANELS
  1139. --------------------------------------------------------------------------------
  1140. Creation:
  1141. --------
  1142. panel P(string header);
  1143. panel P;
  1144. Operations:
  1145. ----------
  1146. void P.text_item(string s)
  1147. void P.bool_item(string label, bool& x)
  1148. void P.real_item(string label, real& x)
  1149. void P.color_item(string label, color& x)
  1150. void P.int_item(string label, int& x)
  1151. void P.int_item(string label, int& x, int min, int max)              // slider
  1152. void P.int_item(string label, int& x, int low, int high, int step)   // choice
  1153. void P.string_item(string label, string& x)
  1154. void P.string_item(string label,string& x,list(string) L)  // menu
  1155. void P.choice_item(string label, int& x, list(string) L)
  1156. void P.choice_item(string label, int& x, int l, string* L)
  1157. void P.choice_item(string label, int& x, string, ... )
  1158. void P.button(string label)
  1159. void P.new_button_line()
  1160. void P.new_button_line(list(string) buttons)
  1161. int  P.open()
  1162. int  P.open(list(string)& buttons)
  1163. --------------------------------------------------------------------------------
  1164. 7. Miscellaneous
  1165. --------------------------------------------------------------------------------
  1166. --------------------------------------------------------------------------------
  1167. Command input streams (cmd_istream)
  1168. --------------------------------------------------------------------------------
  1169. An instance I of the data type cmd_istream is an C++ istream
  1170. connected to the output of a shell command cmd, i.e., all input operations 
  1171. or operators applied to I read from the standard output of command cmd. 
  1172. 1. Creation of a command input stream 
  1173. cmd_istream   in(string cmd);
  1174. creates an instance in of type cmd_istream connected to the output of command cmd.
  1175. 2. Operations
  1176. All operations and operators (>>) defined for C++ istreams can
  1177. be applied to command input streams as well.
  1178. --------------------------------------------------------------------------------
  1179. Command output streams (cmd_ostream)
  1180. --------------------------------------------------------------------------------
  1181. An instance O of the data type cmd_ostream is an C++ ostream
  1182. connected to the input of a shell command cmd, i.e., all output operations 
  1183. or operators applied to O write into the standard input of command cmd. 
  1184. 1. Creation of a command output stream} 
  1185. cmd_ostream   out(string cmd);
  1186. creates an instance out of type cmd_ostream connected to the input of 
  1187. command cmd. 
  1188. 2. Operations 
  1189. All operations and operators (<<) defined for C++ ostreams can
  1190. be applied to command output streams as well.