# Changeset 1183:8f623d1833a7 in lemon-0.x

Ignore:
Timestamp:
03/03/05 18:20:08 (16 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1595
Message:

Some more documentation (sorry, I forgot to check the doxygen.log and now I am under windows)

Location:
doc
Files:
2 edited

Unmodified
Added
Removed
• ## doc/maps.dox

 r1167 \endcode A map can \e readable (\ref lemon::concept::ReadMap "ReadMap", for short), A map can be \e readable (\ref lemon::concept::ReadMap "ReadMap", for short), \e writable (\ref lemon::concept::WriteMap "WriteMap") or both (\ref lemon::concept::ReadWriteMap "ReadWriteMap").
• ## doc/quicktour.dox

 r1181 in telecommunication, computer networks, and other areas that I cannot think of now. A very natural way of modelling these networks is by means of a graph (we will always mean a directed graph by that). of a graph (we will always mean a directed graph by that and say undirected graph otherwise). So if you want to write a program that works with graphs then you might find it useful to use our library LEMON. graphs then you might find it useful to use our library LEMON. LEMON defines various graph concepts depending on what you want to do with the graph: a very good description can be found in the page about \ref graphs "graphs". You will also want to assign data to the edges or nodes of the graph, for example a length or capacity function defined on the edges. You can do this in LEMON using so called \ref maps "maps". You can define a map on the nodes or on the edges of the graph and the value of the map (the range of the function) can be practically almost any type. Read more about maps \ref maps-page "here". Some examples are the following (you will find links next to the code fragments that help to download full demo programs): -# The following code shows how to read a graph from a stream (e.g. a file). LEMON supports the DIMACS file format: it can read a graph instance from a file in that format (find the documentation of the format on the web). in that format (find the documentation of the DIMECS file format on the web). \code Graph g; readDimacs(f, g); \endcode One can also store network (graph+capacity on the edges) instances and other things in DIMACS format: to see the details read the documentation of the \ref dimacs.h "Dimacs file format reader". One can also store network (graph+capacity on the edges) instances and other things in DIMACS format and use these in LEMON: to see the details read the documentation of the \ref dimacs.h "Dimacs file format reader". usually solved using Dijkstra's algorithm. A utility that solves this is  the \ref lemon::Dijkstra "LEMON Dijkstra class". A simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" is as follows (we do not include the part that instantiates the graph and the length function): The following code is a simple program using the \ref lemon::Dijkstra "LEMON Dijkstra class" and it also shows how to define a map on the edges (the length function): \code typedef Graph::EdgeMap LengthMap; Graph G; Node s, t; LengthMap cap(G); ... Dijkstra dijkstra_test(G, cap); dijkstra_test.run(s); typedef ListGraph Graph; typedef Graph::Node Node; typedef Graph::Edge Edge; typedef Graph::EdgeMap LengthMap; Graph g; //An example from Ahuja's book Node s=g.addNode(); Node v2=g.addNode(); Node v3=g.addNode(); Node v4=g.addNode(); Node v5=g.addNode(); Node t=g.addNode(); Edge s_v2=g.addEdge(s, v2); Edge s_v3=g.addEdge(s, v3); Edge v2_v4=g.addEdge(v2, v4); Edge v2_v5=g.addEdge(v2, v5); Edge v3_v5=g.addEdge(v3, v5); Edge v4_t=g.addEdge(v4, t); Edge v5_t=g.addEdge(v5, t); LengthMap len(g); len.set(s_v2, 10); len.set(s_v3, 10); len.set(v2_v4, 5); len.set(v2_v5, 8); len.set(v3_v5, 5); len.set(v4_t, 8); len.set(v5_t, 8); std::cout << "The id of s is " << g.id(s)<< ", the id of t is " << g.id(t)<<"."< dijkstra_test(g,len); dijkstra_test.run(s); std::cout << "The distance of node t from node s: " << dijkstra_test.dist(t)< Related Pages .) If you are interested in data structures and algorithms in more details, then you should browse the reference manual part of the documentation. Section Modules is a good starting point for this. */
Note: See TracChangeset for help on using the changeset viewer.
{"ft_lang_label":"__label__en","ft_lang_prob":0.66098195,"math_prob":0.7617082,"size":6105,"snap":"2021-04-2021-17","text_gpt3_token_len":1818,"char_repetition_ratio":0.113424025,"word_repetition_ratio":0.10241546,"special_character_ratio":0.34217855,"punctuation_ratio":0.16800584,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97626626,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-23T04:29:13Z\",\"WARC-Record-ID\":\"<urn:uuid:9e5f6165-5f66-4a8c-83ad-6d4e5235af42>\",\"Content-Length\":\"40482\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c44e2683-87c0-47fb-899f-97e78ced3524>\",\"WARC-Concurrent-To\":\"<urn:uuid:f1869b35-bb27-44b1-9e9f-8682aa991b06>\",\"WARC-IP-Address\":\"157.181.227.195\",\"WARC-Target-URI\":\"https://lemon.cs.elte.hu/trac/lemon/changeset/8f623d1833a760d89c31ff03714c223faa7016cc/lemon-0.x\",\"WARC-Payload-Digest\":\"sha1:RCQDDRQLLFWBGWJRSAIZERORYCTCZTYZ\",\"WARC-Block-Digest\":\"sha1:N3OETBQAQXM3R7DNF6UFXC6DIWI7OQ4H\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618039601956.95_warc_CC-MAIN-20210423041014-20210423071014-00389.warc.gz\"}"}