5.15.4. visitor.hpp¶
Full path: graph_canon/visitor/visitor.hpp
-
class
no_result¶ A helper-class to derive visitors from that do not want to return data.
-
template<typename
State>
tagged_list<>extract_result(const State&)¶ - Returns
tagged_list<>()
-
template<typename
-
class
no_instance_data¶ A helper-class to derive visitors from that do not need extra instance-wide data.
-
template<typename
Config, typenameTreeNode>
classInstanceData¶ -
using
type= tagged_list<>¶
-
using
-
template<typename
-
class
no_tree_node_data¶ A helper-class to derive visitors from that do not need extra data in each tree node.
-
template<typename
Config, typenameTreeNode>
classTreeNodeData¶ -
using
type= tagged_list<>¶
-
using
-
template<typename
-
class
null_visitor: no_instance_data, no_tree_node_data, no_result¶ A visitor that does nothing. That is, it provides a default implementation for each event.
-
template<typename
Vis>
conceptVisitor¶ The central concept for plugins. When writing new plugins it may be useful to derive from
null_visitorto start with default-implementations of all elements.Notation
-
State
state¶ A specialization of
canon_state.
-
TreeNode
t¶ A specialization of
tree_node.
-
Perm
aut¶ A
perm_group::Permutation.
Associated Types-
template<typename
Config, typenameTreeNode>
classVis::InstanceData¶ - Template Parameters
Config – a specialization of
config.TreeNode – a specialization of
tree_node.
-
type
type¶ An alias for either a
tagged_listor atagged_element. An object of the this type will be instantiated in eachcanon_state. If non is needed, you can derive fromno_instance_data.
-
template<typename
Config, typenameTreeNode>
classVis::TreeNodeData¶ -
type
type¶ An alias for either a
tagged_listor atagged_element. An object of the this type will be instantiated in eachtree_node. If non is needed, you can derive fromno_tree_node_data.
-
type
-
type
Vis::can_select_target_cell¶ An alias for either
std::true_typeorstd::false_typeto denote whether the visitor want to be the target cell selector. If so, the expressionvis.select_target_cell(state, t)must be valid, and return a non-negative integer strictly less than \(n\).
-
type
Vis::can_explore_tree¶ An alias for either
std::true_typeorstd::false_typeto denote whether the visitor want to provide the tree traversal algorithm. If so, the expressionvis.explore_tree(state)must be valid.
Valid ExpressionsTree Node Methods
- Return type: a specialization of either
tagged_listortagged_element.Called: when the complete tree has been explored. - Return type:
voidCalled: in the beginning ofcanon_state::report_leaf.
Canonical Form Methods
- Return type:
voidCalled: incanon_state::report_leafafter a new best leaf has been assigned. A pointer to a previous leaf, if any, is given. - Return type:
voidCalled: incanon_state::report_leafwhen the candidate nodetis worse than the current best leaf. - Return type:
voidCalled: incanon_state::prune_canon_leafif there is a best leaf, before it is unassigned.
Automorphism Methods
- Return type:
voidCalled: incanon_state::prune_canon_leafwhen the candidate leaftis as good as the current best leaf.
Refinement Methods
- Return type:
RefinementResultCalled: by thecanon_statethrough thetree_nodeconstructor. - Return type:
voidCalled: by visitors before the cell starting atrefinee_beginand ending atrefinee_endis being split.The partition oftmust be in a valid state when this method is called.Therefiner_beginmay becanon_state::nor the cell which the calling visitor defines as being responsible for the splits.After this method call thevis.refine_new_cellmethod may be invoked with numbers in the rangerefinee_begintorefinee_end.A matching call tovis.refine_cell_split_endwith the same arguments must be made before a new cell can be split.This method will not be called before an individualization operation. - Return type:
voidCalled: by visitors for each new cell-beginning being created. E.g., for a cell 0 to 10, split into 0 to 2 and 2 to 10, only a call with 2 will be made.The method may only be called between a matching pair ofvis.refine_cell_split_beginandvis.refine_cell_split_end, and only with cell beginnings in the range specified by those calls.The partition oftmust be in a valid state when this method is called, and the cell must have been created at this time. That is, aftervis.refine_cell_split_beginthe partition is fully modified (all splits are made), and then all calls tovis.refine_new_cellis made.Thetypevariable of typestd::size_tis a visitor-defined number to communicate which kind of split it made.This method will not be called before an individualization operation. - Return type:
boolCalled: by visitors after the cell starting atrefinee_beginand ending atrefinee_endwas split.The partition oftmust be in a valid state when this method is called.The call must be after a matchingvis.refine_cell_beginand must be given the same arguments.Returningfalsemeans refinement should be aborted and the tree node pruned.This method will not be called before an individualization operation. - Return type:
boolCalled: by visitors, probably mostly Weisfeiler-Leman-style visitors.The partition oftmust be in a valid state when this method is called.Deprecated since version 0.2: This method will be refactored not too far in the future.
- Return type:
boolCalled: by visitors, probably mostly Weisfeiler-Leman-style visitors.The partition oftmust be in a valid state when this method is called.Deprecated since version 0.2: This method will be refactored not too far in the future.
- Return type:
voidCalled: by visitors and by thetree_nodeconstructor when refinement is being aborted.The partition oftmust be in a valid state when this method is called.Deprecated since version 0.2: This method will be refactored not too far in the future.
Node Invariant Methods
- Return type:
voidCalled: byinvariant_coordinator::better_invariantwhen a visitor reports that it has a better invariant value.
-
State