Goto Chapter: Top 1 2 3 4 5 6 7 8 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

3 Implementation
 3.1 State
 3.2 Applying refiners
 3.3 Currently unorganised stuff

3 Implementation

3.1 State

3.1-1 IsBacktrackableState
‣ IsBacktrackableState( arg )( filter )

Returns: true or false

3.1-2 IsBTKitState
‣ IsBTKitState( arg )( filter )

Returns: true or false

3.1-3 BacktrackableStateFamily
‣ BacktrackableStateFamily( global variable )

3.1-4 BTKitStateType
‣ BTKitStateType( global variable )

3.1-5 SaveState
‣ SaveState( arg )( operation )

Returns: The saved state

Return a small object which allows one to revert to this state from later the search.

3.1-6 RestoreState
‣ RestoreState( state, saved )( operation )

Returns: Nothing

Revert to a saved state from later in the search. The first argument state must be the current state object, and the second argument saved must be one of the objects produced by SaveState (3.1-5) from earlier in the search.

3.1-7 ConsolidateState
‣ ConsolidateState( arg1, arg2 )( operation )

Some implementations of BacktrackableState can perform simplifications. This function gives a well-defined point for such operations to be performed. It can be ignored by implementations without such simplifications.

3.2 Applying refiners

3.2-1 InitialiseConstraints
‣ InitialiseConstraints( state, tracer, rbase )( function )

Returns: true or false

Set up the list of constraints in state.conlist, using their refine.initialise members. This should be called once at the start of RBase creation, and once at the start of search. During search, if the branch of search becomes inconsistent with the RBase, then this function returns false. Otherwise, this function returns true.

The second and third arguments tracer and rbase should be as in RefineConstraints (3.2-2).

3.2-2 RefineConstraints
‣ RefineConstraints( state, tracer, rbase )( function )

Returns: true or false

Refine the partition stack state.ps according to the list of constraints in state.conlist, until it is not possible to use them to refine the current partition stack any further, or until the branch of search becomes inconsistent with the RBase. In the former case, this function returns true, and in the latter case, this function returns false.

During RBase creation, the second argument tracer must be a recording tracer, and the third argument rbase must be true. During search, the second argument should be a tracer following the corresponding RBase tracer, and the third argument rbase should be false.

3.2-3 FinaliseRBaseForConstraints
‣ FinaliseRBaseForConstraints( arg )( function )

Set up a list of constraints. This should be called once, at the start of search after all constraints have been created.

3.2-4 ApplyFilters
‣ ApplyFilters( ps, tracer, filter )( operation )

Returns: true or false

Split the cells of the partition stack ps, if possible, according to a given filter. If the filter is fail, or if the split is rejected by the tracer, then this function returns false. Otherwise, the split is applied and is consistent with the tracer, and this function returns true.

3.3 Currently unorganised stuff

3.3-1 BTKit_BuildProblem
‣ BTKit_BuildProblem( arg )( function )

Takes a partition stack and a list of constraints and builds a 'Problem', Which can then be solved by passing the 'Problem' to BTKit_SimpleSearch (2.1-1) or BTKit_SimpleSinglePermSearch (2.1-2).

3.3-2 FirstFixedPoint
‣ FirstFixedPoint( arg )( function )

3.3-3 BuildRBase
‣ BuildRBase( arg )( function )

3.3-4 Backtrack
‣ Backtrack( arg )( function )
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 Bib Ind

generated by GAPDoc2HTML