Vcsn  2.8
Be Rational
are-isomorphic.hh File Reference
#include <algorithm>
#include <map>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <boost/range/algorithm/permutation.hpp>
#include <boost/range/algorithm/sort.hpp>
#include <vcsn/algos/accessible.hh>
#include <vcsn/dyn/automaton.hh>
#include <vcsn/dyn/fwd.hh>
#include <vcsn/misc/functional.hh>
#include <vcsn/misc/map.hh>
#include <vcsn/misc/vector.hh>
Include dependency graph for are-isomorphic.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >
 
struct  vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response
 A datum specifying if two given automata are isomorphic, and why if they are not. More...
 

Namespaces

 vcsn
 
 vcsn::detail
 
 vcsn::dyn
 
 vcsn::dyn::detail
 

Macros

#define HASH_TRANSITIONS(Expression, Endpoint_Getter)
 

Functions

template<Automaton Aut1, Automaton Aut2>
bool vcsn::are_isomorphic (const Aut1 &a1, const Aut2 &a2)
 
template<Automaton Aut1, Automaton Aut2>
bool vcsn::dyn::detail::are_isomorphic (const automaton &aut1, const automaton &aut2)
 Bridge. More...
 

Macro Definition Documentation

◆ HASH_TRANSITIONS

#define HASH_TRANSITIONS (   Expression,
  Endpoint_Getter 
)
Value:
{ \
auto endpoint_states = std::unordered_set<state_t_of<Aut>>{}; \
transitions_t tt; \
for (auto& t: Expression) \
{ \
tt.emplace_back(a->weight_of(t), a->label_of(t)); \
endpoint_states.emplace(a->Endpoint_Getter(t)); \
} \
boost::sort(tt, less); \
for (const auto& t: tt) \
{ \
hash_combine(res, ws.hash(t.first)); \
hash_combine(res, ls.hash(t.second)); \
} \
hash_combine(res, endpoint_states.size()); \
}
auto sort(const Aut &a) -> permutation_automaton< Aut >
Definition: sort.hh:161
return res
Definition: multiply.hh:399

Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::state_to_class().