<tb@panthema.net>
<http://www.gnu.org/licenses/>
#include "alg_game.h"
#include "bispanning.h"
#include "enumerate.h"
class TestAlgGame
{
public:
explicit TestAlgGame(const std::vector<const char*>& result)
: result_(result) { }
void operator () (const BaseGraph& g)
{
graphs_.emplace_back(g);
}
~TestAlgGame()
{
ASSERT(graphs_.size() == result_.size() / 2);
for (size_t i = 0, j = 0; i < graphs_.size(); ++i) {
std::string base6 = write_graph6(graphs_[i]);
if (base6 != result_[j]) {
std::cout << "/* base6 " << i << " */ \"" << base6 << "\",\n";
}
++j;
AlgGame<BaseGraph> game(graphs_[i]);
std::string tau6 = write_graph6(game.tau_);
if (tau6 != result_[j]) {
std::cout << "/* tau6 " << i << " */ \"" << tau6 << "\",\n";
}
++j;
}
}
protected:
std::vector<BaseGraph> graphs_;
const std::vector<const char*>& result_;
};
int main()
{
static const std::vector<const char*> atomic4 = {
"C~",
"Ks]IIGoK?F_]",
};
enumerate_bispanning_graphs("atomic 4", TestAlgGame(atomic4));
static const std::vector<const char*> all5 = {
"DV{",
":W___`AB_?_C`@D`E`EaBaADaBbBDcCFJLdEEMfGGNfHHNgHIKgHIKiIJLjKKLoPQQSToPRRST",
"D]{",
":[_?___b_D`@A`@C`@aCdFIaEeJbbBJJbCdGIMeEPPfHKfLQQgMNNgHOhKLNNsTVhMOQQWiIKKOOrSTUYY",
};
enumerate_bispanning_graphs("5", TestAlgGame(all5));
static const std::vector<const char*> all6 = {
"EC~w",
":o_OGCCCB_?G?A?C__OkCAE_`wG]CB`?_kGCE`?wWKJB@`g_OOLGP?_c[Pa`OoYIFBcgo[MRcA@GchGDAak_UJIqPOglHDaqsgUKFq`Wo^KEBQCoWMGrPgw[SebpxA[NFcY@?aPISaPKeVOGy`SiUJHIx_oYLHYxcqZLhZ@cw[NGZ@cy\\NGZPkw[NgjPky\\Ngjpw}^OG{ADAaPG{q\\OgTIdavKfSiTYlWl",
"EEzw",
":w_?GCA@B_?G?UA@@OOGQA@__OoYCCaa@cGNA@@gwuF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Hku",
"EQzw",
":o_O?CA@@@`G?A?D__OSCAE_`wG]CB@o__QIDCB@kGCEBO_w[\\BAOoWYECa@?sSIHHDGo[MTcA@Gc^GDAaC_UJGQPOglHDaqsgUPHq`XCfKEcQKoWNHCh_seRebPxOhMFDQh[}`fcA@WkagcQPQcRHdIx_oYLGyxcqZLgz@cw[NGJ@cy\\NGJPkw[QHZPky\\QHZpw}`QHJy@?`Qh[q\\OgTIdavKfSiTYlWl",
"EQ~o",
"~?@GsACAMHaOOK@A@SA_D?@C?E??Q@G?@C??@CBK??@_??A_??C_???OO@_o???????@_??CE???O@_???@_????I??O?A_?C??I?_???g@????K?AG??I??_??E?@A??@O?A???D??_???S?@????W?H????W?G_???B?_o????d??????CW??????IO??????Q_??????GOA?D???CG?_@O???oE????????o??????E_o???????W????????W?????????K??O?????o??WG?????Y_?O?????@`_@???????q_?_??????d_?O??????LG?O??????@i?A????????L@?????????iC?????????oe_?????????E?????????ERO???????????Bg?????????]Y?????????@fg",
"EUZw",
":{_O?C?@?_PG?YAA@OOGKFE_`WG]MI`?_WMCAA`WOIEBAoo[OGIDP?cQGDbDWoWgSb`r@aMFJdx?cQMFQ@W{^IKEBXqOKGRRHczHCaqKcQKECaSgm[OQpWoWUJR@h?eRebRPhCafB`w{bMFCAS{]OGDat|HOHDA`cqhiDAl[oWOHd\\CcUtIyPSkYLJiXKgSMfTIeeRIdSQIqXLEdap[mlfcIDNZNhSjHd[MFbqLEgSWCADAbPjTmPGdQjtzDbeTkEBDbeRiDAvQmYLuzbesYlUrXox",
"EUzo",
":~?@C_GAC??A?_?A??wC@@GCD_OWE_gKI_OIA_oyA@?}A@O}BAPEBCW_M`?OD`?WEDGOS`OWECg[Q`pME@g[FBo}F@ooKa?_HDW_JCG_LBPAJCWoRFaEHBOsPa_wMa_gaGggLEwkLEpuKBo{^GQQMB`[ZF@qMCHGSFaiQCpOdHQiTD`WWEAmVEQmTE`o[d`]UEx[XEaokiQgiJrIWEPuWEPkZe`g\\GaIcIRA[F@sgIB]`Gq[tLba]Fa?_GqKnJx{_Hr?pMH{cHQSiIi?eKBE`GqWeLBUdHR?qKbOujQwoLBYlJrCtLZKvMro~mbg{NRw}OCF",
"EUzW",
":w_?G?A@?_PG?YA@@?gGKF@A@GGSJEBAgG[MK`?_[GCD`?gWUKMGoo{[dCa@APIGDbBqHUMFKEH?_QMFQ@?k]NcAA@AQJGcX`GcYMqPhKfLIDBsgiTdAapW{]dAqx]WWKEriEYLKeSaQ[OHra`crNIdas{_VgCq`WlfSIi@SmXKiyHCeRJdzPo}eRUcATIfRusIHCgSUraLQhmFsAHCiTYtY|_qmGSYTIkUKzhs}^PgtivKfSITiv[nWKUjTku",
"ETzo",
":o_OGCCCB_?G?A?C_`wGCJ@?`gG]CB`?_kGCE`?wWKJB@`g_OQLGP?_g[Pa`OoYIFBcgo[MRcAp_}OGCdX?_SUcAp_}QHDAaccUJIq`WklKEBQCoWMGrPgw[SebpxA[NFcY@?aPISaPKeZOGy`SiUJHIx[o[NGYx[q\\Ngj@_qXLhZ@gs[NGZHgs\\NgjXow\\MhZpw}^OG{ADAaPG{qXMfSItavOhSidQlWl",
"ETzg",
":o_O?CA@@@`G?A?D__OSCAE_`wG]CB@o__QIDCB@kGCEBO_w[\\BAOoWYECa@?sSIHHDGo[MTcA@Gc^GDAaC_UJGQPOglHDaqsgUPHq`XCfKEcQKoWNHCh_seRebPxOhMFDQh[}`fcA@WkagcQPQcRHdIx_oYLGyxcqZLgz@cw[NGJ@cy\\NGJPkw[QHZPky\\QHZpw}`QHJy@?`Qh[q\\OgTIdavKfSiTYlWl",
};
enumerate_bispanning_graphs("6", TestAlgGame(all6));
return 0;
}
template class AlgGameBase<BaseGraph, false>;
template class AlgGameBase<BaseGraph, true>;