Generated on Sat Feb 7 2015 02:01:28 for Gecode by doxygen 1.8.9.1
var-type.hpp
Go to the documentation of this file.
1 /*
2  * CAUTION:
3  * This file has been automatically generated. Do not edit,
4  * edit the following files instead:
5  * - ./gecode/int/var-imp/int.vis
6  * - ./gecode/int/var-imp/bool.vis
7  * - ./gecode/set/var-imp/set.vis
8  * - ./gecode/float/var-imp/float.vis
9  *
10  * This file contains generated code fragments which are
11  * copyrighted as follows:
12  *
13  * Main author:
14  * Christian Schulte <schulte@gecode.org>
15  *
16  * Copyright:
17  * Christian Schulte, 2007
18  *
19  * The generated code fragments are part of Gecode, the generic
20  * constraint development environment:
21  * http://www.gecode.org
22  *
23  * Permission is hereby granted, free of charge, to any person obtaining
24  * a copy of this software and associated documentation files (the
25  * "Software"), to deal in the Software without restriction, including
26  * without limitation the rights to use, copy, modify, merge, publish,
27  * distribute, sublicense, and/or sell copies of the Software, and to
28  * permit persons to whom the Software is furnished to do so, subject to
29  * the following conditions:
30  *
31  * The above copyright notice and this permission notice shall be
32  * included in all copies or substantial portions of the Software.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41  *
42  */
43 
44 #ifdef GECODE_HAS_INT_VARS
45 namespace Gecode { namespace Int {
102 }}
103 #endif
104 #ifdef GECODE_HAS_INT_VARS
105 namespace Gecode { namespace Int {
128 }}
129 #endif
130 #ifdef GECODE_HAS_SET_VARS
131 namespace Gecode { namespace Set {
250 }}
251 #endif
252 #ifdef GECODE_HAS_FLOAT_VARS
253 namespace Gecode { namespace Float {
294 }}
295 #endif
296 #ifdef GECODE_HAS_INT_VARS
297 namespace Gecode { namespace Int {
300  public:
302  static const int idx_c = 0;
304  static const int idx_d = -1;
308  static const int free_bits = 0;
310  static const int med_fst = 0;
312  static const int med_lst = med_fst + 2;
314  static const int med_mask = ((1 << 2) - 1) << med_fst;
318  static bool med_update(Gecode::ModEventDelta& med, Gecode::ModEvent me);
319  };
320 }}
321 #else
322 namespace Gecode { namespace Int {
324  class IntVarImpConf {
325  public:
327  static const int idx_c = -1;
329  static const int idx_d = -1;
331  static const int med_lst = 0;
332  };
333 }}
334 #endif
335 #ifdef GECODE_HAS_INT_VARS
336 namespace Gecode { namespace Int {
339  public:
347  static const int free_bits = 2;
351  static const int med_lst = med_fst + 1;
353  static const int med_mask = ((1 << 1) - 1) << med_fst;
357  static bool med_update(Gecode::ModEventDelta& med, Gecode::ModEvent me);
358  };
359 }}
360 #else
361 namespace Gecode { namespace Int {
363  class BoolVarImpConf {
364  public:
366  static const int idx_c = Gecode::Int::IntVarImpConf::idx_c;
368  static const int idx_d = Gecode::Int::IntVarImpConf::idx_d;
370  static const int med_lst = Gecode::Int::IntVarImpConf::med_lst;
371  };
372 }}
373 #endif
374 #ifdef GECODE_HAS_SET_VARS
375 namespace Gecode { namespace Set {
378  public:
386  static const int free_bits = 0;
390  static const int med_lst = med_fst + 4;
392  static const int med_mask = ((1 << 4) - 1) << med_fst;
396  static bool med_update(Gecode::ModEventDelta& med, Gecode::ModEvent me);
397  };
398 }}
399 #else
400 namespace Gecode { namespace Set {
402  class SetVarImpConf {
403  public:
405  static const int idx_c = Gecode::Int::BoolVarImpConf::idx_c;
407  static const int idx_d = Gecode::Int::BoolVarImpConf::idx_d;
410  };
411 }}
412 #endif
413 #ifdef GECODE_HAS_FLOAT_VARS
414 namespace Gecode { namespace Float {
417  public:
425  static const int free_bits = 0;
429  static const int med_lst = med_fst + 2;
431  static const int med_mask = ((1 << 2) - 1) << med_fst;
435  static bool med_update(Gecode::ModEventDelta& med, Gecode::ModEvent me);
436  };
437 }}
438 #else
439 namespace Gecode { namespace Float {
441  class FloatVarImpConf {
442  public:
444  static const int idx_c = Gecode::Set::SetVarImpConf::idx_c;
446  static const int idx_d = Gecode::Set::SetVarImpConf::idx_d;
448  static const int med_lst = Gecode::Set::SetVarImpConf::med_lst;
449  };
450 }}
451 #endif
452 
453 namespace Gecode {
454 
456  class AllVarConf {
457  public:
464  };
465 
466 }
467 
468 #ifdef GECODE_HAS_INT_VARS
469 namespace Gecode { namespace Int {
472  static const Gecode::ModEvent me_c = (
473  (
474  (ME_INT_NONE << 0) | // [ME_INT_NONE][ME_INT_NONE]
475  (ME_INT_VAL << 2) | // [ME_INT_NONE][ME_INT_VAL ]
476  (ME_INT_BND << 4) | // [ME_INT_NONE][ME_INT_BND ]
477  (ME_INT_DOM << 6) // [ME_INT_NONE][ME_INT_DOM ]
478  ) |
479  (
480  (ME_INT_VAL << 8) | // [ME_INT_VAL ][ME_INT_NONE]
481  (ME_INT_VAL << 10) | // [ME_INT_VAL ][ME_INT_VAL ]
482  (ME_INT_VAL << 12) | // [ME_INT_VAL ][ME_INT_BND ]
483  (ME_INT_VAL << 14) // [ME_INT_VAL ][ME_INT_DOM ]
484  ) |
485  (
486  (ME_INT_BND << 16) | // [ME_INT_BND ][ME_INT_NONE]
487  (ME_INT_VAL << 18) | // [ME_INT_BND ][ME_INT_VAL ]
488  (ME_INT_BND << 20) | // [ME_INT_BND ][ME_INT_BND ]
489  (ME_INT_BND << 22) // [ME_INT_BND ][ME_INT_DOM ]
490  ) |
491  (
492  (ME_INT_DOM << 24) | // [ME_INT_DOM ][ME_INT_NONE]
493  (ME_INT_VAL << 26) | // [ME_INT_DOM ][ME_INT_VAL ]
494  (ME_INT_BND << 28) | // [ME_INT_DOM ][ME_INT_BND ]
495  (ME_INT_DOM << 30) // [ME_INT_DOM ][ME_INT_DOM ]
496  )
497  );
498  return ((me_c >> (me2 << 3)) >> (me1 << 1)) & 3;
499  }
500  forceinline bool
502  switch (me) {
503  case ME_INT_NONE:
504  return false;
505  case ME_INT_VAL:
506  {
507  Gecode::ModEventDelta med_int = med & med_mask;
508  if (med_int == (ME_INT_VAL << med_fst))
509  return false;
510  med ^= med_int;
511  med ^= ME_INT_VAL << med_fst;
512  break;
513  }
514  case ME_INT_BND:
515  {
516  static const Gecode::ModEvent me_c = (
517  ((ME_INT_NONE ^ ME_INT_BND ) << 0) |
518  ((ME_INT_VAL ^ ME_INT_VAL ) << 4) |
519  ((ME_INT_BND ^ ME_INT_BND ) << 8) |
520  ((ME_INT_DOM ^ ME_INT_BND ) << 12)
521  );
522  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
523  Gecode::ModEvent me_n = (me_c >> (me_o << 2)) & (med_mask >> med_fst);
524  if (me_n == 0)
525  return false;
526  med ^= me_n << med_fst;
527  break;
528  }
529  case ME_INT_DOM:
530  {
531  Gecode::ModEventDelta med_int = med & med_mask;
532  if (med_int != 0)
533  return false;
534  med |= ME_INT_DOM << med_fst;
535  break;
536  }
537  default: GECODE_NEVER;
538  }
539  return true;
540  }
541 
542 }}
543 #endif
544 #ifdef GECODE_HAS_INT_VARS
545 namespace Gecode { namespace Int {
548  return me1 | me2;
549  }
550  forceinline bool
552  switch (me) {
553  case ME_BOOL_NONE:
554  return false;
555  case ME_BOOL_VAL:
556  if ((med & (ME_BOOL_VAL << med_fst)) != 0)
557  return false;
558  med |= ME_BOOL_VAL << med_fst;
559  break;
560  default: GECODE_NEVER;
561  }
562  return true;
563  }
564 
565 }}
566 #endif
567 #ifdef GECODE_HAS_SET_VARS
568 namespace Gecode { namespace Set {
571  static const Gecode::ModEvent me_c[ME_SET_CBB+1][ME_SET_CBB+1] = {
572  {
573  ME_SET_NONE, // [ME_SET_NONE][ME_SET_NONE]
574  ME_SET_VAL , // [ME_SET_NONE][ME_SET_VAL ]
575  ME_SET_CARD, // [ME_SET_NONE][ME_SET_CARD]
576  ME_SET_LUB , // [ME_SET_NONE][ME_SET_LUB ]
577  ME_SET_GLB , // [ME_SET_NONE][ME_SET_GLB ]
578  ME_SET_BB , // [ME_SET_NONE][ME_SET_BB ]
579  ME_SET_CLUB, // [ME_SET_NONE][ME_SET_CLUB]
580  ME_SET_CGLB, // [ME_SET_NONE][ME_SET_CGLB]
581  ME_SET_CBB // [ME_SET_NONE][ME_SET_CBB ]
582  },
583  {
584  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_NONE]
585  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_VAL ]
586  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_CARD]
587  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_LUB ]
588  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_GLB ]
589  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_BB ]
590  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_CLUB]
591  ME_SET_VAL , // [ME_SET_VAL ][ME_SET_CGLB]
592  ME_SET_VAL // [ME_SET_VAL ][ME_SET_CBB ]
593  },
594  {
595  ME_SET_CARD, // [ME_SET_CARD][ME_SET_NONE]
596  ME_SET_VAL , // [ME_SET_CARD][ME_SET_VAL ]
597  ME_SET_CARD, // [ME_SET_CARD][ME_SET_CARD]
598  ME_SET_CLUB, // [ME_SET_CARD][ME_SET_LUB ]
599  ME_SET_CGLB, // [ME_SET_CARD][ME_SET_GLB ]
600  ME_SET_CBB , // [ME_SET_CARD][ME_SET_BB ]
601  ME_SET_CLUB, // [ME_SET_CARD][ME_SET_CLUB]
602  ME_SET_CGLB, // [ME_SET_CARD][ME_SET_CGLB]
603  ME_SET_CBB // [ME_SET_CARD][ME_SET_CBB ]
604  },
605  {
606  ME_SET_LUB , // [ME_SET_LUB ][ME_SET_NONE]
607  ME_SET_VAL , // [ME_SET_LUB ][ME_SET_VAL ]
608  ME_SET_CLUB, // [ME_SET_LUB ][ME_SET_CARD]
609  ME_SET_LUB , // [ME_SET_LUB ][ME_SET_LUB ]
610  ME_SET_BB , // [ME_SET_LUB ][ME_SET_GLB ]
611  ME_SET_BB , // [ME_SET_LUB ][ME_SET_BB ]
612  ME_SET_CLUB, // [ME_SET_LUB ][ME_SET_CLUB]
613  ME_SET_CBB , // [ME_SET_LUB ][ME_SET_CGLB]
614  ME_SET_CBB // [ME_SET_LUB ][ME_SET_CBB ]
615  },
616  {
617  ME_SET_GLB , // [ME_SET_GLB ][ME_SET_NONE]
618  ME_SET_VAL , // [ME_SET_GLB ][ME_SET_VAL ]
619  ME_SET_CGLB, // [ME_SET_GLB ][ME_SET_CARD]
620  ME_SET_BB , // [ME_SET_GLB ][ME_SET_LUB ]
621  ME_SET_GLB , // [ME_SET_GLB ][ME_SET_GLB ]
622  ME_SET_BB , // [ME_SET_GLB ][ME_SET_BB ]
623  ME_SET_CBB , // [ME_SET_GLB ][ME_SET_CLUB]
624  ME_SET_CGLB, // [ME_SET_GLB ][ME_SET_CGLB]
625  ME_SET_CBB // [ME_SET_GLB ][ME_SET_CBB ]
626  },
627  {
628  ME_SET_BB , // [ME_SET_BB ][ME_SET_NONE]
629  ME_SET_VAL , // [ME_SET_BB ][ME_SET_VAL ]
630  ME_SET_CBB , // [ME_SET_BB ][ME_SET_CARD]
631  ME_SET_BB , // [ME_SET_BB ][ME_SET_LUB ]
632  ME_SET_BB , // [ME_SET_BB ][ME_SET_GLB ]
633  ME_SET_BB , // [ME_SET_BB ][ME_SET_BB ]
634  ME_SET_CBB , // [ME_SET_BB ][ME_SET_CLUB]
635  ME_SET_CBB , // [ME_SET_BB ][ME_SET_CGLB]
636  ME_SET_CBB // [ME_SET_BB ][ME_SET_CBB ]
637  },
638  {
639  ME_SET_CLUB, // [ME_SET_CLUB][ME_SET_NONE]
640  ME_SET_VAL , // [ME_SET_CLUB][ME_SET_VAL ]
641  ME_SET_CLUB, // [ME_SET_CLUB][ME_SET_CARD]
642  ME_SET_CLUB, // [ME_SET_CLUB][ME_SET_LUB ]
643  ME_SET_CBB , // [ME_SET_CLUB][ME_SET_GLB ]
644  ME_SET_CBB , // [ME_SET_CLUB][ME_SET_BB ]
645  ME_SET_CLUB, // [ME_SET_CLUB][ME_SET_CLUB]
646  ME_SET_CBB , // [ME_SET_CLUB][ME_SET_CGLB]
647  ME_SET_CBB // [ME_SET_CLUB][ME_SET_CBB ]
648  },
649  {
650  ME_SET_CGLB, // [ME_SET_CGLB][ME_SET_NONE]
651  ME_SET_VAL , // [ME_SET_CGLB][ME_SET_VAL ]
652  ME_SET_CGLB, // [ME_SET_CGLB][ME_SET_CARD]
653  ME_SET_CBB , // [ME_SET_CGLB][ME_SET_LUB ]
654  ME_SET_CGLB, // [ME_SET_CGLB][ME_SET_GLB ]
655  ME_SET_CBB , // [ME_SET_CGLB][ME_SET_BB ]
656  ME_SET_CBB , // [ME_SET_CGLB][ME_SET_CLUB]
657  ME_SET_CGLB, // [ME_SET_CGLB][ME_SET_CGLB]
658  ME_SET_CBB // [ME_SET_CGLB][ME_SET_CBB ]
659  },
660  {
661  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_NONE]
662  ME_SET_VAL , // [ME_SET_CBB ][ME_SET_VAL ]
663  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_CARD]
664  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_LUB ]
665  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_GLB ]
666  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_BB ]
667  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_CLUB]
668  ME_SET_CBB , // [ME_SET_CBB ][ME_SET_CGLB]
669  ME_SET_CBB // [ME_SET_CBB ][ME_SET_CBB ]
670  }
671  };
672  return me_c[me1][me2];
673  }
674  forceinline bool
676  switch (me) {
677  case ME_SET_NONE:
678  return false;
679  case ME_SET_VAL:
680  {
681  Gecode::ModEventDelta med_set = med & med_mask;
682  if (med_set == (ME_SET_VAL << med_fst))
683  return false;
684  med ^= med_set;
685  med ^= ME_SET_VAL << med_fst;
686  break;
687  }
688  case ME_SET_CARD:
689  {
690  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
692  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
696  (ME_SET_BB ^ ME_SET_CBB ) << med_fst,
697  (ME_SET_CLUB ^ ME_SET_CLUB) << med_fst,
699  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
700  };
701  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
702  Gecode::ModEventDelta med_n = me_c[me_o];
703  if (med_n == 0)
704  return false;
705  med ^= med_n;
706  break;
707  }
708  case ME_SET_LUB:
709  {
710  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
712  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
714  (ME_SET_LUB ^ ME_SET_LUB ) << med_fst,
715  (ME_SET_GLB ^ ME_SET_BB ) << med_fst,
716  (ME_SET_BB ^ ME_SET_BB ) << med_fst,
719  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
720  };
721  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
722  Gecode::ModEventDelta med_n = me_c[me_o];
723  if (med_n == 0)
724  return false;
725  med ^= med_n;
726  break;
727  }
728  case ME_SET_GLB:
729  {
730  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
732  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
734  (ME_SET_LUB ^ ME_SET_BB ) << med_fst,
735  (ME_SET_GLB ^ ME_SET_GLB ) << med_fst,
736  (ME_SET_BB ^ ME_SET_BB ) << med_fst,
740  };
741  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
742  Gecode::ModEventDelta med_n = me_c[me_o];
743  if (med_n == 0)
744  return false;
745  med ^= med_n;
746  break;
747  }
748  case ME_SET_BB:
749  {
750  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
751  (ME_SET_NONE ^ ME_SET_BB ) << med_fst,
752  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
754  (ME_SET_LUB ^ ME_SET_BB ) << med_fst,
755  (ME_SET_GLB ^ ME_SET_BB ) << med_fst,
756  (ME_SET_BB ^ ME_SET_BB ) << med_fst,
759  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
760  };
761  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
762  Gecode::ModEventDelta med_n = me_c[me_o];
763  if (med_n == 0)
764  return false;
765  med ^= med_n;
766  break;
767  }
768  case ME_SET_CLUB:
769  {
770  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
772  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
775  (ME_SET_GLB ^ ME_SET_CBB ) << med_fst,
776  (ME_SET_BB ^ ME_SET_CBB ) << med_fst,
777  (ME_SET_CLUB ^ ME_SET_CLUB) << med_fst,
778  (ME_SET_CGLB ^ ME_SET_CBB ) << med_fst,
779  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
780  };
781  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
782  Gecode::ModEventDelta med_n = me_c[me_o];
783  if (med_n == 0)
784  return false;
785  med ^= med_n;
786  break;
787  }
788  case ME_SET_CGLB:
789  {
790  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
792  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
794  (ME_SET_LUB ^ ME_SET_CBB ) << med_fst,
796  (ME_SET_BB ^ ME_SET_CBB ) << med_fst,
799  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
800  };
801  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
802  Gecode::ModEventDelta med_n = me_c[me_o];
803  if (med_n == 0)
804  return false;
805  med ^= med_n;
806  break;
807  }
808  case ME_SET_CBB:
809  {
810  static const Gecode::ModEventDelta me_c[ME_SET_CBB+1] = {
812  (ME_SET_VAL ^ ME_SET_VAL ) << med_fst,
814  (ME_SET_LUB ^ ME_SET_CBB ) << med_fst,
815  (ME_SET_GLB ^ ME_SET_CBB ) << med_fst,
816  (ME_SET_BB ^ ME_SET_CBB ) << med_fst,
818  (ME_SET_CGLB ^ ME_SET_CBB ) << med_fst,
819  (ME_SET_CBB ^ ME_SET_CBB ) << med_fst
820  };
821  Gecode::ModEvent me_o = (med & med_mask) >> med_fst;
822  Gecode::ModEventDelta med_n = me_c[me_o];
823  if (med_n == 0)
824  return false;
825  med ^= med_n;
826  break;
827  }
828  default: GECODE_NEVER;
829  }
830  return true;
831  }
832 
833 }}
834 #endif
835 #ifdef GECODE_HAS_FLOAT_VARS
836 namespace Gecode { namespace Float {
838  FloatVarImpConf::me_combine(Gecode::ModEvent me1, Gecode::ModEvent me2) {
839  static const Gecode::ModEvent me_c = (
840  (
841  (ME_FLOAT_NONE << 0) | // [ME_FLOAT_NONE][ME_FLOAT_NONE]
842  (ME_FLOAT_VAL << 2) | // [ME_FLOAT_NONE][ME_FLOAT_VAL ]
843  (ME_FLOAT_BND << 4) // [ME_FLOAT_NONE][ME_FLOAT_BND ]
844  ) |
845  (
846  (ME_FLOAT_VAL << 8) | // [ME_FLOAT_VAL ][ME_FLOAT_NONE]
847  (ME_FLOAT_VAL << 10) | // [ME_FLOAT_VAL ][ME_FLOAT_VAL ]
848  (ME_FLOAT_VAL << 12) // [ME_FLOAT_VAL ][ME_FLOAT_BND ]
849  ) |
850  (
851  (ME_FLOAT_BND << 16) | // [ME_FLOAT_BND ][ME_FLOAT_NONE]
852  (ME_FLOAT_VAL << 18) | // [ME_FLOAT_BND ][ME_FLOAT_VAL ]
853  (ME_FLOAT_BND << 20) // [ME_FLOAT_BND ][ME_FLOAT_BND ]
854  )
855  );
856  return ((me_c >> (me2 << 3)) >> (me1 << 1)) & 3;
857  }
858  forceinline bool
859  FloatVarImpConf::med_update(Gecode::ModEventDelta& med, Gecode::ModEvent me) {
860  switch (me) {
861  case ME_FLOAT_NONE:
862  return false;
863  case ME_FLOAT_VAL:
864  {
865  Gecode::ModEventDelta med_float = med & med_mask;
866  if (med_float == (ME_FLOAT_VAL << med_fst))
867  return false;
868  med ^= med_float;
869  med ^= ME_FLOAT_VAL << med_fst;
870  break;
871  }
872  case ME_FLOAT_BND:
873  {
874  Gecode::ModEventDelta med_float = med & med_mask;
875  if (med_float != 0)
876  return false;
877  med |= ME_FLOAT_BND << med_fst;
878  break;
879  }
880  default: GECODE_NEVER;
881  }
882  return true;
883  }
884 
885 }}
886 #endif
887 namespace Gecode {
890 #ifdef GECODE_HAS_INT_VARS
892 #endif
893 #ifdef GECODE_HAS_INT_VARS
895 #endif
896 #ifdef GECODE_HAS_SET_VARS
898 #endif
899 #ifdef GECODE_HAS_FLOAT_VARS
901 #endif
902  return med1;
903  }
904 }
905 
906 // STATISTICS: kernel-var
const Gecode::PropCond PC_FLOAT_NONE
Propagation condition to be ignored (convenience)
Definition: var-type.hpp:275
const PropCond PC_GEN_NONE
Propagation condition to be ignored (convenience)
Definition: core.hpp:158
static Gecode::ModEvent me_combine(Gecode::ModEvent me1, Gecode::ModEvent me2)
Combine modification events me1 and me2.
Definition: var-type.hpp:547
static bool med_update(Gecode::ModEventDelta &med, Gecode::ModEvent me)
Update modification even delta med by me, return true on change.
Definition: var-type.hpp:501
const Gecode::PropCond PC_SET_CLUB
Propagate when the cardinality or the least upper bound of a view changes.
Definition: var-type.hpp:227
const Gecode::ModEvent ME_SET_FAILED
Domain operation has resulted in failure.
Definition: var-type.hpp:138
static const int med_fst
Start of bits for modification event delta.
Definition: var-type.hpp:349
static bool med_update(Gecode::ModEventDelta &med, Gecode::ModEvent me)
Update modification even delta med by me, return true on change.
Definition: var-type.hpp:859
const Gecode::PropCond PC_SET_CARD
Propagate when the cardinality of a view changes.
Definition: var-type.hpp:216
static const int med_lst
End of bits for modification event delta.
Definition: var-type.hpp:390
static const int free_bits
Freely available bits.
Definition: var-type.hpp:308
const Gecode::ModEvent ME_SET_LUB
Domain operation has changed the least upper bound.
Definition: var-type.hpp:156
static Gecode::ModEvent me_combine(Gecode::ModEvent me1, Gecode::ModEvent me2)
Combine modification events me1 and me2.
Definition: var-type.hpp:570
static const int med_mask
Bitmask for modification event delta.
Definition: var-type.hpp:353
static Gecode::ModEvent me_combine(Gecode::ModEvent me1, Gecode::ModEvent me2)
Combine modification events me1 and me2.
Definition: var-type.hpp:838
static const int med_fst
Start of bits for modification event delta.
Definition: var-type.hpp:427
static Gecode::ModEvent me_combine(Gecode::ModEvent me1, Gecode::ModEvent me2)
Combine modification events me1 and me2.
Definition: var-type.hpp:471
const Gecode::ModEvent ME_SET_BB
Domain operation has changed both greatest lower and least upper bound.
Definition: var-type.hpp:172
const ModEvent ME_GEN_ASSIGNED
Generic modification event: variable is assigned a value.
Definition: core.hpp:153
int ModEvent
Type for modification events.
Definition: core.hpp:146
const Gecode::ModEvent ME_FLOAT_FAILED
Domain operation has resulted in failure.
Definition: var-type.hpp:260
const Gecode::PropCond PC_SET_NONE
Propagation condition to be ignored (convenience)
Definition: var-type.hpp:199
static bool med_update(Gecode::ModEventDelta &med, Gecode::ModEvent me)
Update modification even delta med by me, return true on change.
Definition: var-type.hpp:675
const Gecode::ModEvent ME_FLOAT_VAL
Domain operation has resulted in a value (assigned variable)
Definition: var-type.hpp:264
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
Definition: var-type.hpp:52
static const Gecode::PropCond pc_max
Maximal propagation condition.
Definition: var-type.hpp:423
const Gecode::PropCond PC_INT_NONE
Propagation condition to be ignored (convenience)
Definition: var-type.hpp:74
Configuration for all variable implementations.
Definition: var-type.hpp:456
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
Definition: var-type.hpp:118
static const int med_fst
Start of bits for modification event delta.
Definition: var-type.hpp:388
static const int idx_d
Index for disposal.
Definition: var-type.hpp:304
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition: var-type.hpp:91
const Gecode::ModEvent ME_SET_CGLB
Domain operation has changed the greatest lower bound and the cardinality.
Definition: var-type.hpp:186
int PropCond
Type for propagation conditions.
Definition: core.hpp:156
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
Definition: var-type.hpp:56
const Gecode::ModEvent ME_SET_CBB
Domain operation has changed both the greatest lower bound and the least upper bound, as well as the cardinality.
Definition: var-type.hpp:197
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition: var-type.hpp:100
const PropCond PC_GEN_ASSIGNED
Propagation condition for an assigned variable.
Definition: core.hpp:160
const Gecode::ModEvent ME_INT_BND
Domain operation has changed the minimum or maximum of the domain.
Definition: var-type.hpp:65
const Gecode::ModEvent ME_BOOL_NONE
Domain operation has not changed domain.
Definition: var-type.hpp:114
static const int med_mask
Bitmask for modification event delta.
Definition: var-type.hpp:314
const Gecode::ModEvent ME_SET_GLB
Domain operation has changed the greatest lower bound.
Definition: var-type.hpp:164
static const int free_bits
Freely available bits.
Definition: var-type.hpp:425
const Gecode::ModEvent ME_SET_NONE
Domain operation has not changed domain.
Definition: var-type.hpp:140
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Definition: var-type.hpp:248
static const int idx_c
Index for cloning.
Definition: var-type.hpp:419
static const Gecode::PropCond pc_max
Maximal propagation condition.
Definition: var-type.hpp:384
static const int med_fst
Start of bits for modification event delta.
Definition: var-type.hpp:310
const Gecode::PropCond PC_FLOAT_VAL
Propagate when a view becomes assigned (single value)
Definition: var-type.hpp:283
static const int idx_d
Index for disposal.
Definition: var-type.hpp:382
static const int idx_c
Index for cloning.
Definition: var-type.hpp:380
static const int med_lst
End of bits for modification event delta.
Definition: var-type.hpp:351
static const int med_mask
Bitmask for modification event delta.
Definition: var-type.hpp:392
static const Gecode::PropCond pc_max
Maximal propagation condition.
Definition: var-type.hpp:306
static const int idx_c
Index for cloning.
Definition: var-type.hpp:459
static const int idx_c
Index for cloning.
Definition: var-type.hpp:341
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
Definition: var-type.hpp:72
static const int idx_d
Index for disposal.
Definition: var-type.hpp:343
const Gecode::PropCond PC_SET_CGLB
Propagate when the cardinality or the greatest lower bound of a view changes.
Definition: var-type.hpp:238
static ModEventDelta med_combine(ModEventDelta med1, ModEventDelta med2)
Combine modification event delta med1 with med2.
Definition: var-type.hpp:889
const Gecode::ModEvent ME_SET_CLUB
Domain operation has changed the least upper bound and the cardinality.
Definition: var-type.hpp:179
#define forceinline
Definition: config.hpp:132
const Gecode::ModEvent ME_FLOAT_NONE
Domain operation has not changed domain.
Definition: var-type.hpp:262
static const int med_lst
End of bits for modification event delta.
Definition: var-type.hpp:429
static const int free_bits
Freely available bits.
Definition: var-type.hpp:347
const ModEvent ME_GEN_NONE
Generic modification event: no modification.
Definition: core.hpp:151
Configuration for Bool-variable implementations.
Definition: var-type.hpp:338
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
Definition: var-type.hpp:292
const Gecode::ModEvent ME_BOOL_FAILED
Domain operation has resulted in failure.
Definition: var-type.hpp:112
Configuration for Float-variable implementations.
Definition: var-type.hpp:416
static bool med_update(Gecode::ModEventDelta &med, Gecode::ModEvent me)
Update modification even delta med by me, return true on change.
Definition: var-type.hpp:551
static const int free_bits
Freely available bits.
Definition: var-type.hpp:386
static const int idx_d
Index for disposal.
Definition: var-type.hpp:421
Gecode toplevel namespace
Configuration for Int-variable implementations.
Definition: var-type.hpp:299
const Gecode::PropCond PC_SET_VAL
Propagate when a view becomes assigned (single value)
Definition: var-type.hpp:207
const Gecode::ModEvent ME_FLOAT_BND
Domain operation has changed the minimum or maximum of the domain.
Definition: var-type.hpp:273
static const Gecode::PropCond pc_max
Maximal propagation condition.
Definition: var-type.hpp:345
const Gecode::ModEvent ME_SET_VAL
Domain operation has resulted in a value (assigned variable)
Definition: var-type.hpp:142
const Gecode::ModEvent ME_SET_CARD
Domain operation has changed the variable cardinality.
Definition: var-type.hpp:148
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
static const int idx_d
Index for dispose.
Definition: var-type.hpp:461
#define GECODE_NEVER
Assert that this command is never executed.
Definition: macros.hpp:60
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
Definition: var-type.hpp:54
static const int idx_c
Index for cloning.
Definition: var-type.hpp:302
Configuration for Set-variable implementations.
Definition: var-type.hpp:377
const ModEvent ME_GEN_FAILED
Generic modification event: failed variable.
Definition: core.hpp:149
static const int med_mask
Bitmask for modification event delta.
Definition: var-type.hpp:431
static const int med_lst
End of bits for modification event delta.
Definition: var-type.hpp:312
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)
Definition: var-type.hpp:82
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
Definition: var-type.hpp:126
const Gecode::ModEvent ME_BOOL_VAL
Domain operation has resulted in a value (assigned variable)
Definition: var-type.hpp:116