Hello, I have a question concerning the alldifferent predicate. The example below compiles well in eclipse, but the query "foo( Vert, Hor )." results in an "abort" with the error message: out of range in ic_excl(ic(Hor{-1.0Inf .. 1.0Inf}, integer, -1.0Inf, 1.0Inf, undefined, [], [], [], []), 3) If I replace the alldifferent predicate with the #\= operator, everything works fine. In fact, the example below is just the iolated problem, my actual data contain much more facts and foo is more complex, in particular, it takes more arguments which have to be pairwse disjoint. Of course, I could realize pairwise disjointness with a conjunction of #\= operators, but this is not elegant. Is there a better solution for this problem? And I wonder about the reason why alldifferent does not work here. Thanks in advance Cornelius Hagen ***** Example ********************** :- use_module(library(ic)). line( 3, 0.9, 0.0, 1.0 ). line( 1, 0.9, 0.0, 0.0 ). line( 9, 0.6, -1.0, 0.0 ). line( 7, 0.9, 0.0, 0.0 ). line( 5, 0.9, 0.0, 1.0 ). foo( Vert, Hor ) :- alldifferent( [ Vert, Hor] ), % Vert #\= Hor, line( Vert, ObjConfVert, Vertx, Vertytop ), line( Hor, ObjConfHor, Hory, Horxr ). ------------------------------------------------- Dipl. Math. Cornelius Hagen Lehrstuhl für Angewandte Informatik in den Kultur, Geschichts- und Geowissenschaften Feldkirchenstr. 21 D-96045 Bamberg Tel: + 951 / 863-2843 E-Mail: cornelius.hagen@wiai.uni-bamberg.de Homepage: http://www.uni-bamberg.de/~ba7ag99/cornelius_hagen.htmReceived on Mon Feb 03 08:25:56 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:21 PM GMT GMT