class SITUATION
Summary
Direct parents
Inherit list: BACKTRACKING
Class invariant
Overview
Features
{ANY}
{}
{ANY}
internal
{}
Common client features
{ANY}
Control of the exploration
{ANY}
Internal
{}
Specific to sequences
{ABSTRACT_BACKTRACKING_SEQUENCE}
Specific to alternatives
{ABSTRACT_BACKTRACKING_ALTERNATIVE}
internal: allocation and collection
{}
{ANY}
the pools
{ANY}
description: DESCRIPTION
writable attribute
{ANY}
dimension: INTEGER_32
writable attribute
{ANY}
pdim: INTEGER_32
writable attribute
{ANY}
wdim: INTEGER_32
writable attribute
{ANY}
permut: ARRAY[PERMUT]
writable attribute
{ANY}
solution: FAST_ARRAY[PERMUT]
writable attribute
{ANY}
p: PERMUT
writable attribute
{ANY}
q: PERMUT
writable attribute
{ANY}
situation: FAST_ARRAY[BIT_STRING]
writable attribute
{ANY}
undo_masks: FAST_ARRAY[BIT_STRING]
writable attribute
{ANY}
undo_index: FAST_ARRAY[INTEGER_32]
writable attribute
{ANY}
undo_top: INTEGER_32
writable attribute
{ANY}
nrsol: INTEGER_32
writable attribute
{ANY}
make (the_desc: DESCRIPTION)
effective procedure
{ANY}
solve
effective procedure
{ANY}
index (g1: GROUP, g2: GROUP): INTEGER_32
effective function
{ANY}
The index of the group pair
index_integer (g1: INTEGER_32, g2: INTEGER_32): INTEGER_32
effective function
{ANY}
the index of the pair
context_clear
effective procedure
{ANY}
Clear any saved context.
context_push
effective procedure
{ANY}
Push the current context.
context_restore
effective procedure
{ANY}
Restore the context to the last saved one.
context_restore_and_pop
effective procedure
{ANY}
Restore the context to the last saved one and drop it.
context_cut
effective procedure
{ANY}
no cut allowed
change (idx: INTEGER_32, mask: BIT_STRING): BOOLEAN
effective function
{ANY}
success
effective procedure
{ANY}
try_solution (idx: INTEGER_32)
effective procedure
{ANY}
if idx is a valid group index then test if that group 'idx'
is_ok (mid: INTEGER_32, last: INTEGER_32): BOOLEAN
effective function
{ANY}
index_of_permut (x: PERMUT): INTEGER_32
effective function
{ANY}
the index of the permutation 'x' side effect: alter q
print_solution
effective procedure
{ANY}
print_dash_line
effective procedure
{ANY}
print_head_line
effective procedure
{ANY}
print_content_lines
effective procedure
{ANY}
print_group_pair (g1: GROUP, g2: GROUP)
effective procedure
{ANY}
effective function
{}
make_permut (pos: INTEGER_32)
effective procedure
{}
set_current_node (node: BACKTRACKING_NODE)
effective procedure
{ANY}
Sets the next node of the BACKTRACKING_NODE graph to evaluate.
push_and (node: BACKTRACKING_NODE)
effective procedure
{ANY}
Pushes node in front of the continuation path.
push_and_list (list: BACKTRACKING_NODE_AND_LIST)
effective procedure
{ANY}
Pushes list in front of the continuation path.
push_or (node: BACKTRACKING_NODE)
effective procedure
{ANY}
Pushes node in front of the possible alternatives.
push_or_list (list: BACKTRACKING_NODE_OR_LIST)
effective procedure
{ANY}
Pushes list in front of the possible alternatives.
current_node: BACKTRACKING_NODE
writable attribute
{}
Current node of the BACKTRACKING_NODE graph to be evaluated.
evaluate_current_state
effective procedure
{}
That feature is called to evaluate the current state
search_first
effective procedure
{ANY}
Resets all and searches the first solution.
search_next
effective procedure
{ANY}
Searches the next solution.
search_is_success: BOOLEAN
writable attribute
{ANY}
True when search is successful
is_off: BOOLEAN
effective function
{ANY}
True when search is finished
clear
effective procedure
{ANY}
Clears the current state to nothing.
is_cleared: BOOLEAN
effective function
{ANY}
True if no partial data remain in the current state
push_sequence (sequence: ABSTRACT_BACKTRACKING_SEQUENCE)
effective procedure
{ANY}
Pushes the sequence in front of the continuation path.
push_alternative (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
{ANY}
Pushes the alternative before the continuation path.
continue
effective procedure
{ANY}
Continues the exploration of the current path.
backtrack
effective procedure
{ANY}
Stops the exploration of the current path and tries to explore the next alternative path.
push_cut_point
effective procedure
{ANY}
Inserts a cut point into the continuation path.
cut
effective procedure
{ANY}
Removes the alternatives until the one recorded by the next cut point in the continuation path.
cut_all
effective procedure
{ANY}
Cuts all alternatives.
stop_search_loop: BOOLEAN
writable attribute
{}
True if at the end of a search.
search
effective procedure
{}
Common search loop to search_first and search_next
cut_until (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
{}
Cut all alternatives until 'alternative'.
Stack of sequences represented by its top (can be Void)
current_continuation: ABSTRACT_BACKTRACKING_SEQUENCE
writable attribute
The current continuation path
pop_sequence
effective procedure
Removes the current sequence and replace it by the next sequence in the continuation path.
Stack of alternatives represented by its top (can be Void)
continue_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
pop_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
remove_top_sequence
effective procedure
{}
Removes the top sequence.
remove_top_alternative
effective procedure
{}
Removes the top alternative.
once function
{ANY}
Bank of cut points
once function
{ANY}
pool_of_sequence_list: BACKTRACKING_POOL_OF_SEQUENCE_LIST
once function
{ANY}
pool_of_alternative: BACKTRACKING_POOL_OF_ALTERNATIVE
once function
{ANY}
pool_of_alternative_list: BACKTRACKING_POOL_OF_ALTERNATIVE_LIST
once function
{ANY}