[gecode-users] initialize ViewArray<IntView> from IntVarArray
Pascal Francq (Mailing lists)
mailing-list at francq.info
Wed Mar 13 16:57:37 CET 2013
Hi,
I am developing a propagator which constructors takes an IntVarArray as
parameter, and I want to initialize a ViewArray on this parameter.
My current code looks like :
class MyPropagator : public Propagator
{
ViewArray<IntView> C;
MyPropagator(Home home,IntVarArray& c)
: Propagator(home), C(home,c.size())
{
for(size_t j=0;j<4;j++)
C[j]=IntView(c[j]);
C.subscribe(home,*this,PC_GEN_ASSIGNED);
}
};
When I run the code, I have segmentation fault. I suppose that my
constructor is not correct.
Thanks.
--
Dr. Pascal Francq
Belgium
More information about the users
mailing list