Implementation of compression algorithm for deterministic finite state machine.
./DFAM.sh <command> <input_file> <output_file>
(or bash DFAM.sh
...)
(NB! Incorrect arguments or incorrect io files format can lead to undefined behaviour)
(NB! x2 You should execute DFAM.sh from root dir of project)
(NB! x3 All file paths are relative)
- compress: take DFA from input file, compress it and place into the output file (you can find format description of DFA below)
example: ./DFAM compress sample.in sample.out
- paint: take DFA from input file, place picture into the output file
examples:
-
./DFAM paint sample.in sample.pdf
(you will get.pdf
file) -
./DFAM paint sample.in sample.png
(you will get.png
file)
(See compressor/tests/sample.*
for better understanding)
NB! In our situation num of edges = (num of states) * (size of alphabet)
- utility
dot
- compiler
g++
with-std=c++17