minmax.icc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "gecode/set.hh"
00029 #include "gecode/int.hh"
00030
00031 namespace Gecode { namespace Set { namespace Int {
00032
00033 forceinline
00034 MinElement::MinElement(Space* home, SetView y0, Gecode::Int::IntView y1)
00035 : IntSetPropagator<SetView,PC_SET_ANY,
00036 Gecode::Int::PC_INT_BND> (home, y0, y1) {}
00037
00038 forceinline ExecStatus
00039 MinElement::post(Space* home, SetView x0,
00040 Gecode::Int::IntView x1) {
00041 GECODE_ME_CHECK(x0.cardMin(home,1));
00042 (void) new (home) MinElement(home,x0,x1);
00043 return ES_OK;
00044 }
00045
00046 forceinline
00047 MinElement::MinElement(Space* home, bool share, MinElement& p)
00048 : IntSetPropagator<SetView,PC_SET_ANY,
00049 Gecode::Int::PC_INT_BND> (home, share, p) {}
00050
00051 forceinline
00052 MaxElement::MaxElement(Space* home, SetView y0, Gecode::Int::IntView y1)
00053 : IntSetPropagator<SetView,PC_SET_ANY,
00054 Gecode::Int::PC_INT_BND> (home, y0, y1) {}
00055
00056 forceinline
00057 MaxElement::MaxElement(Space* home, bool share, MaxElement& p)
00058 : IntSetPropagator<SetView,PC_SET_ANY,
00059 Gecode::Int::PC_INT_BND> (home, share, p) {}
00060
00061 }}}
00062
00063