Awali
Another Weighted Automata library
Data Structures | Namespaces | Macros | Functions
are_isomorphic.hh File Reference
#include <algorithm>
#include <map>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <awali/sttc/algos/accessible.hh>
#include <awali/utils/hash.hh>
#include <awali/sttc/misc/map.hh>
#include <awali/sttc/misc/vector.hh>

Go to the source code of this file.

Data Structures

class  awali::sttc::internal::are_isomorphicer< Aut1, Aut2 >
 

Namespaces

 awali
 Main namespace of Awali.
 
 awali::sttc
 Namespace for the static layer of Awali.
 
 awali::sttc::internal
 Implementation details of static layer (not stable).
 

Macros

#define HASH_TRANSITIONS(expression, endpoint_getter)
 

Functions

template<typename Aut1 , typename Aut2 >
bool awali::sttc::are_isomorphic (const Aut1 &a1, const Aut2 &a2)
 tests whether two automata are isomorphic More...
 

Macro Definition Documentation

◆ HASH_TRANSITIONS

#define HASH_TRANSITIONS (   expression,
  endpoint_getter 
)
Value:
{ \
std::unordered_set<state_t> 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)); \
} \
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()); \
}
RatExpSet::ratexp_t less_than(const RatExpSet &rs, const typename RatExpSet::ratexp_t &v)
Definition: less_than.hh:166
void sort(Aut a, Compare p)
Definition: sort.hh:28
unsigned transition_t
Definition: types.hh:22