Hi, The degree-information for variables is only available through the view-interfaces [1]. Similarly for regret-information.
As a simple example, given that you have an IntVar x, and you want to access the degree-information, you could do the following: IntVar x; // ... Int::IntView xv(x); if (xv.degree() > some_degree) { Cheers, Mikael [1] Integer views: http://www.gecode.org/doc-latest/reference/group__TaskActorIntView.html Set views: http://www.gecode.org/doc-latest/reference/group__TaskActorSetView.html On Thu, Jul 2, 2009 at 3:43 AM, Kish Shen<kiss...@cisco.com> wrote: > Hi, > > Is it possible to obtain the information used in the branch() variable > selection. I am currently most interested in the degree (number of > propagator depending on a variable) for the IntVars, because there I > can't find any easy way to obtain this information, but I assume Gecode > keeps this information internally. > > The reason I am interested in this information is for the interface to > Gecode I am developing for ECLiPSe. I now have a basic working version > where Gecode is used to perform the propagation of the constraints, > while ECLiPSe does the search, which include variable and value > selections. I need the degree information for variable selection, and > because the selection is done in ECLiPSe, I cannot use branch(). > > Thanks in advance for any help and information! > > Cheers, > > Kish > -- > This e-mail may contain confidential and privileged material for the > sole use of the intended recipient. Any review, use, distribution or > disclosure by others is strictly prohibited. If you are not the intended > recipient (or authorized to receive for the recipient), please contact > the sender by reply e-mail and delete all copies of this message. > Cisco Systems Limited (Company Number: 02558939), is registered in > England and Wales with its registered office at 1 Callaghan Square, > Cardiff, South Glamorgan CF10 5BT. > > _______________________________________________ > Gecode users mailing list > us...@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users > -- Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/ _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users