You are right. The comments are incorrect. The first comment that states that it starts from 0 should be removed. There is no implmentation of the method and only interface is specified. Morover, different implementations might have different assumptions on index. Your example uses SimpleSolutionListener and it assumes indexing from 1, following CP tradition.
/Kris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think there is an error in the documentation for getSolution(int no).
http://jacopapi.osolpro.com -> org.jacop.search -> Interface SolutionListener<T extends="" Var="">
says:
In the JaCoP Library User’s Guide: http://jacopguide.osolpro.com/guideJaCoP.pdf
on page 50, the example given shows:
So the first solution has an index 1.
When I try calling label.getSolution(0)[j] I get an error, so I think the JaCoP Library User’s Guide is correct.
Thanks,
Alicia
You are right. The comments are incorrect. The first comment that states that it starts from 0 should be removed. There is no implmentation of the method and only interface is specified. Morover, different implementations might have different assumptions on index. Your example uses SimpleSolutionListener and it assumes indexing from 1, following CP tradition.
/Kris