Adding function to canonicalize an automaton.

* src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh,
src/bin/autfilt.cc: are_isomorphic now uses canonicalize. It returns a
bool, because the mapping cannot be deduced easily from the
canonicalized automaton.
* src/graph/graph.hh: Add equality operator to trans_storage_t
for easy comparison of transition vectors.
* src/tgba/tgbagraph.hh: Add equality operator to tgba_graph_trans_data
and to tgba_digraph.
* src/tgbaalgos/canonicalize.cc, src/tgbaalgos/canonicalize.hh:
New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/isomorph.test: Test them.
This commit is contained in:
Thibaud Michaud 2014-12-11 16:12:27 +01:00
parent b83d6d7f29
commit 1995602df5
9 changed files with 271 additions and 187 deletions

View file

@ -183,10 +183,17 @@ namespace spot
// This might be costly if the destination is a vector
if (dst < other.dst)
return true;
if (dst < other.dst)
if (dst > other.dst)
return false;
return this->data() < other.data();
}
bool operator==(const trans_storage& other) const
{
return src == other.src &&
dst == other.dst &&
this->data() == other.data();
}
};
//////////////////////////////////////////////////