MCPcopy Create free account
hub / github.com/Gecode/gecode / Create

Method Create

test/int/arithmetic.cpp:1069–1252  ·  view source on GitHub ↗

Perform creation and registration

Source from the content-addressed store, hash-verified

1067 public:
1068 /// Perform creation and registration
1069 Create(void) {
1070
1071 const int va[7] = {
1072 Gecode::Int::Limits::min, Gecode::Int::Limits::min+1,
1073 -1,0,1,
1074 Gecode::Int::Limits::max-1, Gecode::Int::Limits::max
1075 };
1076 const int vb[9] = {
1077 static_cast<int>(-sqrt(static_cast<double>
1078 (-Gecode::Int::Limits::min))),
1079 -4,-2,-1,0,1,2,4,
1080 static_cast<int>(sqrt(static_cast<double>
1081 (Gecode::Int::Limits::max)))
1082 };
1083
1084 Gecode::IntSet a(va,7);
1085 Gecode::IntSet b(vb,9);
1086 Gecode::IntSet c(-8,8);
1087 Gecode::IntSet d(-70,70);
1088
1089 (void) new DivMod("A",a);
1090 (void) new DivMod("B",b);
1091 (void) new DivMod("C",c);
1092
1093 (void) new Div("A",a);
1094 (void) new Div("B",b);
1095 (void) new Div("C",c);
1096
1097 (void) new Mod("A",a);
1098 (void) new Mod("B",b);
1099 (void) new Mod("C",c);
1100
1101
1102 for (IntPropLevels ipls; ipls(); ++ipls) {
1103 (void) new AbsXY("A",a,ipls.ipl());
1104 (void) new AbsXY("B",b,ipls.ipl());
1105 (void) new AbsXY("C",c,ipls.ipl());
1106
1107 (void) new AbsXX("A",a,ipls.ipl());
1108 (void) new AbsXX("B",b,ipls.ipl());
1109 (void) new AbsXX("C",c,ipls.ipl());
1110 if (ipls.ipl() != Gecode::IPL_VAL) {
1111 (void) new MultXYZ("A",a,ipls.ipl());
1112 (void) new MultXYZ("B",b,ipls.ipl());
1113 (void) new MultXYZ("C",c,ipls.ipl());
1114
1115 (void) new MultXXY("A",a,ipls.ipl());
1116 (void) new MultXXY("B",b,ipls.ipl());
1117 (void) new MultXXY("C",c,ipls.ipl());
1118
1119 (void) new MultXYX("A",a,ipls.ipl());
1120 (void) new MultXYX("B",b,ipls.ipl());
1121 (void) new MultXYX("C",c,ipls.ipl());
1122
1123 (void) new MultXYY("A",a,ipls.ipl());
1124 (void) new MultXYY("B",b,ipls.ipl());
1125 (void) new MultXYY("C",c,ipls.ipl());
1126

Callers

nothing calls this directly

Calls 2

sqrtFunction · 0.50
iplMethod · 0.45

Tested by

no test coverage detected