[ library(visualize_tree) | Reference Manual | Alphabetic Index ]
tree_indomain_max(+Term, +Handle, ?HandleOut)
Primitive to assign a variable while creating a search tree
- Term
- A term containing the variable to be assigned
- Handle
- an opaque data structure for the visualization
- HandleOut
- will be unified with the Handle argument
Description
This predicate should be used instead of indomain/2 when visualizing the execution. Instead of a single variable, it expects a term which describes the name and index of the variable for logging purposes.
Examples
top(N,L):-
    length(L,N),
    L :: 1..N,
    alldifferent(L),
    create_visualization([],Handle),
    add_visualizer(Handle,vector(L),[]),
    number_variables(Handle,L,Terms),
    root(Handle),
    search(Terms,1,first_fail,
           tree_indomain_max(Handle,_),complete,[]),
    solution(Handle),
    close_visualization(Handle).
See Also
root / 1, solution / 1, fd_search : indomain / 2, gfd_search : indomain / 2, ic : indomain / 2, tree_indomain / 3, tree_indomain_min / 3, tree_indomain_max / 3, tree_indomain_middle / 3, tree_indomain_random / 3