资源说明:Random Uniform walK In Automata
-*- outline -*- rukia - Randon Uniform walK In Automata A library to generate uniformly at random paths in automata. Copyright (C) 2008, 2018 Johan Oudinet * Building Rukia from a fresh git clone * ===================================== ** Bootstrap ** ========= Rukia's build system uses the Autotools. Starting from a newly cloned git repository, the first step is to generate Makefile.am files and configure script using the bootstrap script at the root of the source tree: $ ./bootstrap One needs to call this script only once after git clone. Makefile.am files and configure script then update automatically when needed. The following builds do not need to call bootstrap. This step needs Automake, Autoconf, and Libtool (Debian/Ubuntu packages: automake, autoconf, autotools-dev, libtool, possibly libltdl-dev. Be sure to check your alternatives regarding Autoconf and Automake's versions. See the update-alternatives(8) man page and use the last available versions). It also uses M4 macros provided by the autoconf-archive project: $ apt-get install autoconf-archive Note, the AX_CXX_COMPILE_STDCXX_14 macro is defined in autoconf-archive version 2017.09.28 or above. ** Build ** ===== A standard Autotools build sequence is then possible. We recommend using separate source and build directories: $ mkdir _build $ cd _build $ ../configure [OPTION]... $ make $ make install The prerequisites for a full build are (Debian/Ubuntu packages): libboost-graph-dev (>= 1.55) libgmp-dev If you've installed one of the required libraries in a non classical path, you may need to tell to configure how to find it. For example, assume BGL headers are in $HOME/include and BGL libraries are in $HOME/lib, the following command tell to configure where they are : $ ./configure --with-boost=$HOME *** Tips on manual installation of Boost library *** ============================================ extract boost archive then go in it and enter the two following commands: $ ./bootstrap.sh --prefix=$HOME $ ./b2 install $ sudo ldconfig $HOME/lib Now Boost is correctly installed in your $HOME directory. You just have to tell to configure where look for (as explained previously). * Examples * ======== All the program examples, which use Rukia features, are in src/ directory. You should start from draw_with_ctable.cc that produces the program draw_exact_ctable. This program prints uniformly at random m paths of length n from a graph described in GRAPHVIZ format (.dot). If not all states are final state, you need to give an optional file that lists every final states. The following commands show an example with a graph that have 6 states but only state 5 is a final state. We draw 3 paths of length 7 in this automaton. Actually the first label 'i' is here just to be able to draw paths of length <= 7. Hence, in this particular execution, we got 2 paths of length 3 ('abc' and 'adg') and 1 path of length 5 ('adefg'). $ cat data/example.dot digraph G { 0 -> 0 [label = "i"]; 0 -> 1 [label = "a"]; 1 -> 2 [label = "b"]; 1 -> 3 [label = "d"]; 2 -> 5 [label = "c"]; 3 -> 4 [label = "e"]; 3 -> 5 [label = "g"]; 4 -> 3 [label = "f"]; } $ cat data/example.fs 5 $ src/draw_exact_ctable data/example.dot 3 7 data/example.fs 5 is final. i i a d e f g i i i i a d g i i i i a b c * Comments are most welcome * ========================= For issues, please report them on github: https://github.com/joudinet/rukia -- Johan Oudinet
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。