reify.hpp /usr/include/gecode/int.hh Gecode /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *ChristianSchulte<schulte@gecode.org> * *Copyright: *ChristianSchulte,2011 * *Lastmodified: *$Date:2012-10-1816:02:42+0200(Thu,18Oct2012)$by$Author:schulte$ *$Revision:13154$ * *ThisfileispartofGecode,thegenericconstraint *developmentenvironment: *http://www.gecode.org * *Permissionisherebygranted,freeofcharge,toanypersonobtaining *acopyofthissoftwareandassociateddocumentationfiles(the *"Software"),todealintheSoftwarewithoutrestriction,including *withoutlimitationtherightstouse,copy,modify,merge,publish, *distribute,sublicense,and/orsellcopiesoftheSoftware,andto *permitpersonstowhomtheSoftwareisfurnishedtodoso,subjectto *thefollowingconditions: * *Theabovecopyrightnoticeandthispermissionnoticeshallbe *includedinallcopiesorsubstantialportionsoftheSoftware. * *THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND, *EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOF *MERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEAND *NONINFRINGEMENT.INNOEVENTSHALLTHEAUTHORSORCOPYRIGHTHOLDERSBE *LIABLEFORANYCLAIM,DAMAGESOROTHERLIABILITY,WHETHERINANACTION *OFCONTRACT,TORTOROTHERWISE,ARISINGFROM,OUTOFORINCONNECTION *WITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE. * */ namespaceGecode{ /* *Thereificationclass * */ forceinline Reify::Reify(void) :rm(RM_EQV){} forceinline Reify::Reify(BoolVarx0,ReifyModerm0) :x(x0),rm(rm0){} forceinlineBoolVar Reify::var(void)const{ returnx; } forceinlinevoid Reify::var(BoolVarx0){ x=x0; } forceinlineReifyMode Reify::mode(void)const{ returnrm; } forceinlinevoid Reify::mode(ReifyModerm0){ rm=rm0; } /* *Reificationconveniencefunctions * */ forceinlineReify eqv(BoolVarx){ returnReify(x,RM_EQV); } forceinlineReify imp(BoolVarx){ returnReify(x,RM_IMP); } forceinlineReify pmi(BoolVarx){ returnReify(x,RM_PMI); } } //STATISTICS:int-post