Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
are-isomorphic.hh File Reference
#include <algorithm>
#include <map>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vcsn/algos/accessible.hh>
#include <vcsn/dyn/automaton.hh>
#include <vcsn/dyn/fwd.hh>
#include <vcsn/misc/hash.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
 FIXME: duplicate code with determinize.
 
 vcsn::dyn::detail
 

Macros

#define HASH_TRANSITIONS(expression, endpoint_getter)
 

Functions

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

Macro Definition Documentation

#define HASH_TRANSITIONS (   expression,
  endpoint_getter 
)
Value:
{ \
std::unordered_set<state_t_of<Automaton>> endpoint_states; \
for (auto& t: expression) \
{ \
tt.emplace_back(transition_t{a->weight_of(t), a->label_of(t)}); \
endpoint_states.emplace(a->endpoint_getter(t)); \
} \
std::sort(tt.begin(), tt.end(), less_than); \
for (const auto& t: tt) \
{ \
std::hash_combine(res, ws.hash(t.first)); \
std::hash_combine(res, ls.hash(t.second)); \
} \
std::hash_combine(res, endpoint_states.size()); \
}
auto sort(const Aut &a) -> permutation_automaton< Aut >
Definition: sort.hh:185
std::vector< std::pair< string_t, string_t >> transitions_t
Definition: parse.hh:74
RatExpSet::value_t less_than(const RatExpSet &rs, const typename RatExpSet::value_t &v)
Definition: less-than.hh:150

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