Is there any efficient way of getting the domain size of an IntVarView?

Currently, I'm doing:

int min = view.min();
int max = view.max();
int size = 0;
for (int i = min; i <= max; i++) {
        if (view.in(i)) size++;
}

Also, could you please add a toString() method to IntVarView? It  
would make debugging easier.

Malcolm

--
      "Progress should mean that we are always changing the world to fit
       the vision, instead we are always changing the vision."
                - G.K.Chesterton, Orthodoxy




_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to