[ library(gfd) | Reference Manual | Alphabetic Index ]

<ConsistencyModule:> ham_path_g(?Start,?End,+Succ)

Constrains elements in Succ to form a Hamiltonian path from Start to End, with native Gecode indexing.
An integer or (domain) variable (array notation accepted)
An integer or (domain) variable (array notation accepted)
A collection of different (domain) variables or integers


This version of ham_path/3 uses the native Gecode indexing, which starts from 0. This is different from normal ECLiPSe's indexing, which starts from 1, and may be incompatible with existing ECLiPSe code.

See ham_path/3 for a more detailed description of this predicate.


[eclipse 6]: ham_path_g(S,E,[A,B]).

S = S{[0, 1]}
E = E{[0, 1]}
A = A{[1, 2]}
B = B{[0, 2]}

[eclipse 7]: ham_path_g(1,0,[A,B]).

A = 2
B = 0

[eclipse 8]: ham_path_g(S,E,[1,3,0]).

S = 2
E = 1

See Also

ham_path / 3