Vcsn  2.3
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::are_isomorphicer< Aut1, Aut2 >
 
struct  vcsn::are_isomorphicer< Aut1, Aut2 >::full_response
 A datum specifying if two given automata are isomorphic, and why if they are not. More...
 

Namespaces

 vcsn
 
 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

#define HASH_TRANSITIONS (   expression,
  endpoint_getter 
)
Value:
{ \
std::unordered_set<state_t_of<Aut>> endpoint_states; \
transitions_t tt; \
for (auto& t: expression) \
{ \
tt.emplace_back(transition_t{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()); \
}
std::shared_ptr< const node< Context >> expression
Definition: fwd.hh:187
return res
Definition: multiply.hh:398
auto sort(const Aut &a) -> permutation_automaton< Aut >
Definition: sort.hh:161

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