COIN-OR::LEMON - Graph Library

Changeset 2288:ef8af928c54e in lemon-0.x for doc


Ignore:
Timestamp:
10/31/06 16:57:53 (17 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3053
Message:

Corrected some typos and grammatical errors.

Location:
doc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/basic_concepts.dox

    r2195 r2288  
    33
    44\section basic_graph The graph classes
    5 The most important classes in LEMON are the graph classes. A instance of a graph
     5The most important classes in LEMON are the graph classes. An instance of a graph
    66class is the representation of the mathematical graph. It holds the topology and
    77every structural information of the graph. The structural manipulations are also
     
    99different classes for different purposes. They can differ in many ways, but all
    1010have to satisfy one or more \ref concept "graph concepts" which are standardized
    11 interfaces to work whit the rest of the library. The most basic concept is the
     11interfaces to work with the rest of the library. The most basic concept is the
    1212\ref Graph.<br>
    1313A good example is the \ref ListGraph which we already know from Hello World and
     
    2727If the graph fits the ExtendableGraphComponent concept, then you can add new nodes
    2828to the graph with the addNode() member function. It returns the newly added node
    29 (as value). So if you need the new node to do something useful with it, for example
    30 create a edge, assign a value to it through \ref map1 maps.
     29(as value). So if you need the new node to do something useful with, for example
     30create an edge, assign a value to it through \ref map1 maps.
    3131\code lemon::ListGraph::Node  new_node = graph.addNode(); \endcode
    3232
    33 If the graph fits the ErasableGraphComponent concept you also can remove nodes
     33If the graph fits into the ErasableGraphComponent concept you can also remove nodes
    3434from the graph with the erase() member function.
    3535\code graph.erase( new_node ); \endcode
     
    4444\subsection basic_edge Edges
    4545An Edge is what you think it is. It goes from one node to another node (they can
    46 be identical). If the graph class is directed, the Edge is directed too. Otherwise
     46be identical if the edge is a loop). If the graph class is directed, the Edge is directed too. Otherwise
    4747the edge is considered undirected and called UEdge.
    4848\code lemon::ListUGraph::UEdge \endcode
     
    5151source node and the target node. The graph class must be extendable.
    5252\code lemon::ListGraph::Edge  new_edge = graph.addEdge( src_node, trg_node ); \endcode
    53 You can handle edge similar as nodes. The erase() member function has an edge taking
     53You can handle edges similar as nodes. The erase() member function has an edge taking
    5454overload too.
    5555
     
    6565\section basic_iterators Iterators
    6666Graphs are some kind of containers. And as you expect they have iterator types.
    67 One fore nodes and a couple for edges - and special classes can have additional
     67One for nodes and a couple for edges - and special classes can have additional
    6868iterators too. An example:
    6969\code lemon::ListGraph::NodeIt \endcode
    70 That is a node iterator. Every iterator type starts whit an name what refers to
    71 the iterated object, and ends whit 'It'.
     70This is a node iterator. Every iterator type starts with a name that refers to
     71the iterated object, and ends with 'It'.
    7272
    73 LEMON style iterators differs from \c stl or \c boost iterators in a very tasty
     73LEMON style iterators differ from \c stl or \c boost iterators in a very tasty
    7474way. A graph has no begin or end - or at least a generic graph class has none.
    7575If by some topology you could pick a good begin node, it would be misleading and
     
    8181\code
    8282for( ListGraph::NodeIt n(graph); n != INVALID; ++n )
    83     do_useful_things_whit_node(n);
     83    do_useful_things_with_node(n);
    8484\endcode
    8585Note that the function \c do_useful_things_with_node() expects a Node type argument
     
    9090
    9191<b>Very important!</b> The iteration has no defined order. There is absolutely no
    92 guaranty that the next time the iteration will give us the nodes in the same order.
     92warranty that the next time the iteration will give us the nodes in the same order.
    9393Don't use this order to identify nodes! Use the \c id() member function of the
    9494graph class described above. (There is a powerful technique using maps right in
  • doc/getting_started.dox

    r2195 r2288  
    22\page getting_started Getting Started
    33
    4 At the beginning we hardly suggest that you open your favorite text editor
    5 and enter the code simultaneously as you read it. Compiling the demos is also
    6 a good exercise.
     4At the beginning we strongly suggest that you open your favorite text
     5editor and enter the code simultaneously as you read it. Compiling the
     6demos is also a good exercise.
    77
    8 As the first example we show you a lemon style "Hello World" program. Now we
    9 explain almost every line, but later we will skip the basics and focus on new
    10 things.
     8As the first example we show you a lemon style "Hello World"
     9program. Now we explain almost every line, but later we will skip the
     10basics and focus on new things.
    1111
    1212\section hello_world Hello World in LEMON
     
    2929\until Edge
    3030
    31 For this demo we need to declare a ListGraph and a special NodeMap to store the
    32 characters associated to the graph's nodes.
     31For this demo we need to declare a ListGraph and a special NodeMap to
     32store the characters associated to the graph's nodes. 
    3333\skip main
    3434\until char_map
     
    3838\until addNode
    3939
    40 When a new node or edge to the graph the assigned maps are automatically resized.
    41 So graphs can be build dynamically. The usage of a map is very natural.
     40When a new node or edge is added to the graph the assigned maps are automatically resized.
     41So graphs can be built dynamically. The usage of a map is very natural.
    4242\skip char_map
    4343\until char_map
    4444
    45 Notice that no reference or additional assignment needed to work with nodes.
     45Notice that no reference or additional assignment is needed to work with nodes.
    4646They won't become illegal or won't lead to throwing any exceptions.
    47 You can declare and handle node like every other basic type such as \c int.
     47You can declare and handle a node like every other basic type such as \c int.
    4848\skip Store
    4949\until char_map
     
    5151As one expects adding an Edge is similar. You need to define the \b source node
    5252and the \b destination node. The nodes must belong to the graph of course. The
    53 Edge has the direction from the source to the destination. In some case you don't
     53Edge has the direction from the source to the destination. In some cases you don't
    5454want the edges to be directed - then you use an undirected graph. For example
    5555lemon::ListUGraph.
Note: See TracChangeset for help on using the changeset viewer.