athos@1169: /** athos@1169: alpar@1170: \page quicktour Quick Tour to LEMON alpar@1170: athos@1175: Let us first answer the question "What do I want to use LEMON for?" athos@1175: . athos@1175: LEMON is a C++ library, so you can use it if you want to write C++ athos@1175: programs. What kind of tasks does the library LEMON help to solve? athos@1175: It helps to write programs that solve optimization problems that arise athos@1175: frequently when designing and testing certain networks, for example athos@1175: in telecommunication, computer networks, and other areas that I cannot athos@1175: think of now. A very natural way of modelling these networks is by means athos@1175: of a graph (we will always mean a directed graph by that). athos@1175: So if you want to write a program that works with athos@1175: graphs then you might find it useful to use our library LEMON. athos@1175: athos@1175: athos@1175: athos@1175: Some examples are the following: athos@1175: athos@1175: - First we give two examples that show how to instantiate a graph. The athos@1175: first one shows the methods that add nodes and edges, but one will athos@1175: usually use the second way which reads a graph from a stream (file). athos@1175: athos@1175: athos@1175: -# The following code fragment shows how to fill a graph with data. athos@1175: athos@1175: \code athos@1175: athos@1175: typedef ListGraph Graph; athos@1175: typedef Graph::Edge Edge; athos@1175: typedef Graph::InEdgeIt InEdgeIt; athos@1175: typedef Graph::OutEdgeIt OutEdgeIt; athos@1175: typedef Graph::EdgeIt EdgeIt; athos@1175: typedef Graph::Node Node; athos@1175: typedef Graph::NodeIt NodeIt; athos@1175: athos@1175: Graph g; athos@1175: athos@1175: for (int i = 0; i < 3; i++) athos@1175: g.addNode(); athos@1175: athos@1175: for (NodeIt i(g); i!=INVALID; ++i) athos@1175: for (NodeIt j(g); j!=INVALID; ++j) athos@1175: if (i != j) g.addEdge(i, j); athos@1175: athos@1175: \endcode athos@1175: athos@1175: -# athos@1175: athos@1175: - If you want to solve some transportation problems in a network then athos@1175: you will want to find shortest paths between nodes of a graph. This is athos@1175: usually solved using Dijkstra's algorithm. A utility athos@1175: that solves this is the \ref lemon::Dijkstra "LEMON Dijkstra class". athos@1175: A simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" is athos@1175: as follows (we assume that the graph is already given in the memory): athos@1175: athos@1175: \code athos@1175: athos@1175: \endcode athos@1175: athos@1175: - If you want to design a network and want to minimize the total length athos@1175: of wires then you might be looking for a minimum spanning tree in athos@1175: an undirected graph. This can be found using the Kruskal algorithm: the athos@1175: class \ref lemon::Kruskal "LEMON Kruskal class" does this job for you. athos@1175: The following code fragment shows an example: athos@1175: athos@1175: \code athos@1175: athos@1175: \endcode athos@1175: athos@1175: athos@1175: athos@1175: Some more detailed introduction can be obtained by following the links athos@1175: below: athos@1175: athos@1169: \ref graphs "Graph structures" athos@1175: play a central role in LEMON, so if you are new to the library, athos@1169: you probably should start \ref graphs "here". athos@1175: (You can also find that page along with others under athos@1175: Related Pages .) athos@1169: athos@1169: If you are athos@1169: interested in data structures and algorithms in more details, then athos@1169: you should browse the reference manual part of the documentation. athos@1169: Section Modules athos@1169: is a good starting point for this. athos@1175: */