[gecode-users] InVarArray methods

Christian Schulte cschulte at kth.se
Tue Dec 9 08:15:45 CET 2008


You can only print fields after they have been initialized.

If you say "assign values" what do you mean? Assigning variables to fields
in thne array? Or, assigning values to the variables stored at a fields in
the array?

Did you look at the examples that come with Gecode?

--
Christian Schulte, www.ict.kth.se/~cschulte/


-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Julian Cardona
Sent: Monday, December 08, 2008 6:32 PM
To: users at gecode.org
Subject: [gecode-users] InVarArray methods

Hey people i feel very idiot posting this but i have no idea hot to assign 
values to a IntVarArray, i mean, i have an IntVarArray and i can initialize
it 
how it is described in the API but i dont know how to assign arbitrary
vaules 
to it.
I cant figure out why i can print out the value of a desired position:
std::cout << MyIntVarArray[i] << std::endl;
but im unable to assign values to it in the common way:
MyIntVarArray[4] = element;

Please help me!!!




_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users





More information about the gecode-users mailing list