|
Go to the documentation of this file.
17 using namespace faudes;
29 MtcSystem cb4_0, cb4_0_spec1, cb4_0_spec2, cb4_0_spec, cb4_0_sup, cb4_1,
31 cb4_1_spec, cb11_1_spec, mh1d1_1_spec,
32 rt1_1_spec, rt1_1_spec1, rt1_1_spec2,
33 cb4mh1d1_1, cb4mh1d1_1_spec, cb4mh1d1_1_sup, cb4mh1d1_2, cb4mh1d1_2_orig;
43 cb4_0. Read( "data/cb4[0].gen");
46 mh1d1_0_sup. Read( "data/mh1d1[0]_sup.gen");
47 mh1d1_0_sup. GraphWrite( "tmp_mtc_mh1d1[0]_sup.png");
51 cb4_0_spec1. Read( "data/cb4[0]_spec1.gen");
52 cb4_0_spec1. GraphWrite( "tmp_mtc_cb4[0]_spec1.png");
55 cb4_0_spec2. Read( "data/cb4[0]_spec2.gen");
56 cb4_0_spec2. GraphWrite( "tmp_mtc_cb4[0]_spec2.png");
59 cb4_1_spec. Read( "data/cb4[1]_spec.gen");
60 cb4_1_spec. GraphWrite( "tmp_mtc_cb4[1]_spec.png");
62 mh1d1_1_spec. Read( "data/mh1d1[1]_spec.gen");
63 mh1d1_1_spec. GraphWrite( "tmp_mtc_mh1d1[1]_spec.png");
69 std::cout << std::endl << "MtcParallel(cb4[0]_spec1, cb4[0]_spec2) => cb4[0]_spec" << std::endl;
71 cb4_0_spec. Write( "tmp_mtc_cb4[0]_spec.gen");
72 cb4_0_spec. GraphWrite( "tmp_mtc_cb4[0]_spec.png");
74 std::cout << "MtcSupConNB(cb4[0], cb4[0]_spec) => cb4[0]_sup" << std::endl << std::endl;
77 cb4_0_sup. Write( "tmp_mtc_cb4[0]_sup.gen");
78 cb4_0_sup. GraphWrite( "tmp_mtc_cb4[0]_sup.png");
88 cb4_1_alph. Insert( "cb11-cb4");
89 cb4_1_alph. Insert( "cb12-cb4");
90 cb4_1_alph. Insert( "cb4-cb11");
91 cb4_1_alph. Insert( "cb4-cb12");
92 cb4_1_alph. Insert( "cb4stp");
94 if ( IsMtcObs(cb4_0_sup, cb4_1_alph)) {
95 std::cout << "Project(cb4[0]_sup) => cb4[1], with alphabet: " << cb4_1_alph. ToString() << std::endl << std::endl;
98 else std::cout << "cb4[0]_sup: Observer condition is not fulfilled" << std::endl;
101 cb4_1. Write( "tmp_mtc_cb4[1].gen");
107 mh1d1_1_alph. Insert( "mh1start");
108 mh1d1_1_alph. Insert( "mh1end");
110 if ( IsMtcObs(mh1d1_0_sup, mh1d1_1_alph)) {
111 std::cout << "Project(mh1d1[0]_sup) => mh1d1[1], with alphabet: " << mh1d1_1_alph. ToString() << std::endl << std::endl;
112 mtcProject(mh1d1_0_sup, mh1d1_1_alph, mh1d1_1);
114 else std::cout << "mh1d1[0]_sup: Observer condition is not fulfilled" << std::endl;
117 mh1d1_1. Write( "tmp_mtc_mh1d1[1].gen");
122 std::cout << "MtcParallel(cb4[1], mh1d1[1]) => cb4mh1d1[1]" << std::endl;
124 cb4mh1d1_1. Write( "tmp_mtc_cb4mh1d1_1.gen");
125 cb4mh1d1_1. GraphWrite( "tmp_mtc_cb4mh1d_1.png");
126 std::cout << "MtcSupConNB(cb4mh1d1[1], cb4mh1d1[1]_spec) => cb4mh1d1[1]_sup" << std::endl << std::endl;
129 mtcSupConNB(cb4mh1d1_1, mh1d1_1_spec, cb4mh1d1_1_sup);
131 cb4mh1d1_1_sup. Write( "tmp_mtc_cb4mh1d1_1_sup.gen");
132 cb4mh1d1_1_sup. GraphWrite( "tmp_mtc_cb4mh1d1_1_sup.png");
142 cb4mh1d1_2_alph. Insert( "cb11-cb4");
143 cb4mh1d1_2_alph. Insert( "cb12-cb4");
144 cb4mh1d1_2_alph. Insert( "cb4-cb11");
145 cb4mh1d1_2_alph. Insert( "cb4-cb12");
146 cb4mh1d1_2_alph. Insert( "mh1end");
148 mtcProject(cb4mh1d1_1_sup, cb4mh1d1_2_alph, cb4mh1d1_2_orig);
152 cb4mh1d1_2_alph. Insert( "cb11-cb4");
153 cb4mh1d1_2_alph. Insert( "cb12-cb4");
154 cb4mh1d1_2_alph. Insert( "cb4-cb11");
155 cb4mh1d1_2_alph. Insert( "cb4-cb12");
156 cb4mh1d1_2_alph. Insert( "mh1end");
158 mtcProject(cb4mh1d1_1_sup, cb4mh1d1_2_alph, cb4mh1d1_2_orig);
160 cb4mh1d1_2_orig. Write( "tmp_mtc_cb4mh1d1_2_orig.gen");
161 cb4mh1d1_2_orig. GraphWrite( "tmp_mtc_cb4mh1d1_2_orig.png");
164 cb4mh1d1_2_orig. Write( "tmp_mtc_cb4mh1d1_2_orig.gen");
165 cb4mh1d1_2_orig. GraphWrite( "tmp_mtc_cb4mh1d1_2_orig.png");
180 cb4mh1d1_2_alph. Clear();
181 cb4mh1d1_2_alph. Insert( "cb11-cb4");
182 cb4mh1d1_2_alph. Insert( "cb12-cb4");
183 cb4mh1d1_2_alph. Insert( "cb4-cb11");
184 cb4mh1d1_2_alph. Insert( "cb4-cb12");
186 cout << "these are the optimal colors " << endl;
187 optimalColors. Write();
188 cout << "this is the optimal alphabet " << endl;
189 cb4mh1d1_2_alph. Write();
191 ColorSet redundantColors = cb4mh1d1_1_sup. Colors() - optimalColors;
192 ColorSet::Iterator cIt = redundantColors. Begin();
193 for( ; cIt != redundantColors. End(); cIt++){
197 if ( IsMtcObs(cb4mh1d1_1_sup, cb4mh1d1_2_alph)) {
198 std::cout << "Project(cb4mh1d1[0]_sup) => cb4mh1d1[2], with alphabet: " << cb4mh1d1_2_alph. ToString() << std::endl << std::endl;
199 mtcProject(cb4mh1d1_1_sup, cb4mh1d1_2_alph, cb4mh1d1_2);
201 else std::cout << "cb4mh1d1[1]_sup: Observer condition is not fulfilled" << std::endl;
204 cb4mh1d1_2. Write( "tmp_mtc_cb4mh1d1_2.gen");
205 cb4mh1d1_2. GraphWrite( "tmp_mtc_cb4mh1d1_2.png");
libFAUDES 2.28c
--- 2016.09.30
--- c++ api documentaion by doxygen
|