![]()  | 
  
    Vcsn
    2.5.dev
    
   Be Rational 
   | 
 
#include <are-isomorphic.hh>
Classes | |
| struct | full_response | 
| A datum specifying if two given automata are isomorphic, and why if they are not.  More... | |
Public Types | |
| using | states1_t = std::vector< state1_t > | 
| using | states2_t = std::vector< state2_t > | 
| using | class_id = std::size_t | 
| Automaton states partitioned into classes.  More... | |
| using | class_pair_t = std::pair< states1_t, states2_t > | 
| using | state_classes_t = std::vector< class_pair_t > | 
| using | origins_t = std::map< state2_t, state1_t > | 
| A map from each a2_ state to the corresponding a1_ state.  More... | |
Public Member Functions | |
| are_isomorphic_impl (const Aut1 &a1, const Aut2 &a2) | |
| full_response | get_full_response () | 
| template<Automaton Aut> | |
| class_id | state_to_class (state_t_of< Aut > s, Aut &a) | 
| const state_classes_t | make_state_classes () | 
| void | print_class_stats (const state_classes_t &cs, std::ostream &o=std::cerr) const | 
| Handy debugging method.  More... | |
| void | print_classes (const state_classes_t &cs, std::ostream &o=std::cerr) const | 
| Handy debugging method.  More... | |
| bool | is_isomorphism_valid () | 
| bool | is_isomorphism_valid_throwing () | 
| void | update_result_isomorphism () | 
| long | factorial (long n) | 
| void | initialize_next_class_combination_state () | 
| bool | next_class_combination () | 
| full_response | get_full_response_nonsequential () | 
| full_response | get_full_response_sequential () | 
| bool | operator() () | 
| origins_t | origins () | 
| Only meaningful if operator() returned true.  More... | |
Static Public Member Functions | |
| static std::ostream & | print (const origins_t &orig, std::ostream &o) | 
| Print origins.  More... | |
Public Attributes | |
| state_classes_t | state_classes_ | 
| std::vector< long > | class_permutation_max_ | 
| We need to keep some (small) state between a next_class_combination call and the next.  More... | |
| std::vector< long > | class_permutation_generated_ | 
Private Member Functions | |
| template<Automaton Aut> | |
| bool | is_sequential_filling (const Aut &a, dout_t< Aut > &dout) | 
| void | fill_nouts_ () | 
| void | clear () | 
| bool | trivially_different () const | 
Private Attributes | |
| automaton1_t | a1_ | 
| automaton2_t | a2_ | 
| dout_t< automaton1_t > | dout1_ | 
| For the simpler, faster sequential case.  More... | |
| dout_t< automaton2_t > | dout2_ | 
| nout_t< automaton1_t > | nout1_ | 
| nout_t< automaton2_t > | nout2_ | 
| struct vcsn::detail::are_isomorphic_impl::full_response | fr_ | 
Definition at line 34 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 37 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 46 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::class_id = std::size_t | 
Automaton states partitioned into classes.
It's guaranteed that a left[right] state in a given class can not be isomorphic to a right[left] in a different class. The idea of course is to restrict the brute-force search to the states within a single class.
Definition at line 245 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::class_pair_t = std::pair<states1_t, states2_t> | 
Definition at line 246 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 38 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 47 of file are-isomorphic.hh.
      
  | 
  private | 
See the comment for out_ in minimize.hh.
Definition at line 77 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 42 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 51 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 40 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 49 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 64 of file are-isomorphic.hh.
      
  | 
  private | 
For the nonsequential case.
Definition at line 95 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::origins_t = std::map<state2_t, state1_t> | 
A map from each a2_ state to the corresponding a1_ state.
The map is ordered, as usual for origins, hence different from fr_.s2tos1.
Definition at line 659 of file are-isomorphic.hh.
      
  | 
  private | 
A worklist of pairs of states which are candidate to be isomorphic.
Or "A candidate-isomorphic state pair worklist", written in Reverse-Polish English.
Definition at line 102 of file are-isomorphic.hh.
      
  | 
  private | 
The maps associating the states of a1_ and the states of a2_->
Definition at line 106 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 107 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 41 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 50 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::state_classes_t = std::vector<class_pair_t> | 
Definition at line 247 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::states1_t = std::vector<state1_t> | 
Definition at line 238 of file are-isomorphic.hh.
| using vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::states2_t = std::vector<state2_t> | 
Definition at line 239 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 44 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 53 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 43 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 52 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 39 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 48 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 63 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 103 of file are-isomorphic.hh.
      
  | 
  inline | 
Definition at line 198 of file are-isomorphic.hh.
      
  | 
  inlineprivate | 
Definition at line 174 of file are-isomorphic.hh.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response().
      
  | 
  inline | 
Definition at line 466 of file are-isomorphic.hh.
References vcsn::res.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::initialize_next_class_combination_state().
      
  | 
  inlineprivate | 
Definition at line 164 of file are-isomorphic.hh.
References vcsn::detail::all_transitions().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response().
      
  | 
  inline | 
Definition at line 204 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::clear(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fill_nouts_(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_sequential(), vcsn::is_accessible(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::is_sequential_filling(), vcsn::require(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::response, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::trivially_different.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::operator()().
      
  | 
  inline | 
Definition at line 543 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::initialize_next_class_combination_state(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::is_isomorphism_valid(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::isomorphic, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::make_state_classes(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::next_class_combination(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::nocounterexample, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::response, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::update_result_isomorphism().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response().
      
  | 
  inline | 
Definition at line 578 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::counterexample, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::isomorphic, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::response, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s1tos2, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s2tos1, and vcsn::rat::size().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response().
      
  | 
  inline | 
Definition at line 479 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::factorial().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential().
      
  | 
  inline | 
Definition at line 378 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::is_isomorphism_valid_throwing().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential().
      
  | 
  inline | 
Definition at line 389 of file are-isomorphic.hh.
References vcsn::detail::all_out(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::has(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s1tos2, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s2tos1.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::is_isomorphism_valid().
      
  | 
  inlineprivate | 
Definition at line 145 of file are-isomorphic.hh.
References vcsn::detail::all_transitions().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response().
      
  | 
  inline | 
Definition at line 305 of file are-isomorphic.hh.
References vcsn::res, vcsn::sort(), and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::state_to_class().
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential().
      
  | 
  inline | 
Definition at line 494 of file are-isomorphic.hh.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential().
      
  | 
  inline | 
Definition at line 650 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::isomorphic, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::response.
      
  | 
  inline | 
Only meaningful if operator() returned true.
Definition at line 663 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::isomorphic, vcsn::require(), vcsn::res, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s2tos1.
      
  | 
  inlinestatic | 
Print origins.
Definition at line 676 of file are-isomorphic.hh.
      
  | 
  inline | 
      
  | 
  inline | 
Handy debugging method.
Definition at line 363 of file are-isomorphic.hh.
      
  | 
  inline | 
Definition at line 251 of file are-isomorphic.hh.
References vcsn::detail::all_in(), vcsn::detail::all_out(), vcsn::hash_combine(), HASH_TRANSITIONS, and vcsn::res.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::make_state_classes().
      
  | 
  inlineprivate | 
Definition at line 182 of file are-isomorphic.hh.
      
  | 
  inline | 
Definition at line 454 of file are-isomorphic.hh.
References vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::fr_, vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s1tos2, and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::full_response::s2tos1.
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential().
      
  | 
  private | 
Definition at line 66 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 67 of file are-isomorphic.hh.
| std::vector<long> vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::class_permutation_generated_ | 
Definition at line 477 of file are-isomorphic.hh.
| std::vector<long> vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::class_permutation_max_ | 
We need to keep some (small) state between a next_class_combination call and the next.
Definition at line 476 of file are-isomorphic.hh.
      
  | 
  private | 
For the simpler, faster sequential case.
Definition at line 80 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 81 of file are-isomorphic.hh.
      
  | 
  private | 
Referenced by vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_nonsequential(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::get_full_response_sequential(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::is_isomorphism_valid_throwing(), vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::origins(), and vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::update_result_isomorphism().
      
  | 
  private | 
Definition at line 96 of file are-isomorphic.hh.
      
  | 
  private | 
Definition at line 97 of file are-isomorphic.hh.
| state_classes_t vcsn::detail::are_isomorphic_impl< Aut1, Aut2 >::state_classes_ | 
Definition at line 248 of file are-isomorphic.hh.