Hello, In my CP code, i have a return from my query a list of lists of terms however i can not display it in my java Code . My query is : ?- solve(A, C, S, 32). A = [[1 * 11.34], [1 * 11.34], [0 * 11.34], [0 * 11.34]] C = [] S = [[1 * 14.5], [1 * 14.5], [0 * 14.5], [0 * 14.5]] In Java i get it like this: result.arg(2)->result1[[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=1 arg(2)=11.34]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=1 arg(2)=11.34]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=0 arg(2)=11.34]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=0 arg(2)=11.34]]] result.arg(3)->result2[] result.arg(4)->result3[[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=1 arg(2)=14.5]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=1 arg(2)=14.5]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=0 arg(2)=14.5]], [com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2 arg(1)=0 arg(2)=14.5]]] However another list of lists is displayed normally in java with the same code, i did not change anything in the code. Just instead of having a list of lists of numbers which is the below CP code, i have a list of lists of terms which is above and is not displayed properly.. ?- solve(A, C, S, 32). A = [[1], [1], [0], [0]] C = [] S = [[1], [1], [0], [0]] i normally get in java, a corresponding list of lists: result.arg(2)->result1[[1], [1], [0], [0]] result.arg(3)->result2[] result.arg(4)->result3[[1], [1], [0], [0]] Thank you a lot, Carole Dawood Computer Science and Engineering German University in CairoReceived on Fri Apr 23 2010 - 20:21:37 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST