Home
last modified time | relevance | path

Searched refs:WeightLiteral (Results 1 – 25 of 63) sorted by relevance

123

/dports/math/clingo/clingo-5.5.1/clasp/clasp-da10954/tests/
H A Dminimize_test.cpp105 mb.add(0, WeightLiteral(z, 1));
122 min.push_back( WeightLiteral(a, 1) );
123 min.push_back( WeightLiteral(b, 2) );
126 min.push_back( WeightLiteral(d, 1) );
147 min.push_back( WeightLiteral(a, 1) );
148 min.push_back( WeightLiteral(b, 1) );
151 min.push_back( WeightLiteral(d, 1) );
157 min.push_back( WeightLiteral(f, 1) );
158 min.push_back( WeightLiteral(x, 2) );
159 min.push_back( WeightLiteral(y, 3) );
[all …]
H A Dweight_constraint_test.cpp348 wlits.push_back(WeightLiteral(a, 4));
349 wlits.push_back(WeightLiteral(~b, 2));
350 wlits.push_back(WeightLiteral(~c, 1));
351 wlits.push_back(WeightLiteral(d, 1));
353 wlits.assign(1, WeightLiteral(a, 2));
358 wlits.assign(1, WeightLiteral(a, 2));
410 wlits.push_back(WeightLiteral(a, 1));
411 wlits.push_back(WeightLiteral(b, 1));
412 wlits.push_back(WeightLiteral(c, 1));
413 wlits.push_back(WeightLiteral(d, 1));
[all …]
H A Dparser_test.cpp199 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(3), 0)) != m1->lits + 2);
200 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(4), 0)) != m1->lits + 2);
201 …REQUIRE(std::find(m1->lits + 2, m1->lits + 4, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + …
257 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + 2);
258 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(2), 1)) != m1->lits + 2);
268 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(1), 1)) != m2->lits + 2);
269 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(2), 1)) != m2->lits + 2);
789 REQUIRE(wLits->lits[0] == WeightLiteral(posLit(2), 4));
790 REQUIRE(wLits->lits[1] == WeightLiteral(posLit(1), 2));
791 REQUIRE(wLits->lits[2] == WeightLiteral(negLit(4), 2));
[all …]
H A Dprogram_builder_test.cpp2355 con.push_back(WeightLiteral(posLit(1), 2));
2358 con.push_back(WeightLiteral(posLit(4), 1));
2359 con.push_back(WeightLiteral(posLit(5), 1));
2403 con.push_back(WeightLiteral(posLit(1), 1));
2405 con.assign(1, WeightLiteral(posLit(1), 1));
2412 con.push_back(WeightLiteral(posLit(1), 1));
2414 con.assign(1, WeightLiteral(posLit(1), 3));
2415 con.push_back(WeightLiteral(posLit(2), 2));
2422 con.push_back(WeightLiteral(posLit(1), 3));
2423 con.push_back(WeightLiteral(posLit(2), 2));
[all …]
/dports/math/clingo/clingo-5.5.1/clasp/tests/
H A Dminimize_test.cpp105 mb.add(0, WeightLiteral(z, 1));
122 min.push_back( WeightLiteral(a, 1) );
123 min.push_back( WeightLiteral(b, 2) );
126 min.push_back( WeightLiteral(d, 1) );
147 min.push_back( WeightLiteral(a, 1) );
148 min.push_back( WeightLiteral(b, 1) );
151 min.push_back( WeightLiteral(d, 1) );
157 min.push_back( WeightLiteral(f, 1) );
158 min.push_back( WeightLiteral(x, 2) );
159 min.push_back( WeightLiteral(y, 3) );
[all …]
H A Dweight_constraint_test.cpp348 wlits.push_back(WeightLiteral(a, 4));
349 wlits.push_back(WeightLiteral(~b, 2));
350 wlits.push_back(WeightLiteral(~c, 1));
351 wlits.push_back(WeightLiteral(d, 1));
353 wlits.assign(1, WeightLiteral(a, 2));
358 wlits.assign(1, WeightLiteral(a, 2));
410 wlits.push_back(WeightLiteral(a, 1));
411 wlits.push_back(WeightLiteral(b, 1));
412 wlits.push_back(WeightLiteral(c, 1));
413 wlits.push_back(WeightLiteral(d, 1));
[all …]
H A Dparser_test.cpp199 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(3), 0)) != m1->lits + 2);
200 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(4), 0)) != m1->lits + 2);
201 …REQUIRE(std::find(m1->lits + 2, m1->lits + 4, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + …
257 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + 2);
258 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(2), 1)) != m1->lits + 2);
268 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(1), 1)) != m2->lits + 2);
269 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(2), 1)) != m2->lits + 2);
789 REQUIRE(wLits->lits[0] == WeightLiteral(posLit(2), 4));
790 REQUIRE(wLits->lits[1] == WeightLiteral(posLit(1), 2));
791 REQUIRE(wLits->lits[2] == WeightLiteral(negLit(4), 2));
[all …]
H A Dprogram_builder_test.cpp2355 con.push_back(WeightLiteral(posLit(1), 2));
2358 con.push_back(WeightLiteral(posLit(4), 1));
2359 con.push_back(WeightLiteral(posLit(5), 1));
2403 con.push_back(WeightLiteral(posLit(1), 1));
2405 con.assign(1, WeightLiteral(posLit(1), 1));
2412 con.push_back(WeightLiteral(posLit(1), 1));
2414 con.assign(1, WeightLiteral(posLit(1), 3));
2415 con.push_back(WeightLiteral(posLit(2), 2));
2422 con.push_back(WeightLiteral(posLit(1), 3));
2423 con.push_back(WeightLiteral(posLit(2), 2));
[all …]
/dports/math/clasp/clasp-3.3.5/tests/
H A Dminimize_test.cpp107 min.push_back( WeightLiteral(a, 1) );
108 min.push_back( WeightLiteral(b, 2) );
111 min.push_back( WeightLiteral(d, 1) );
132 min.push_back( WeightLiteral(a, 1) );
133 min.push_back( WeightLiteral(b, 1) );
136 min.push_back( WeightLiteral(d, 1) );
142 min.push_back( WeightLiteral(f, 1) );
143 min.push_back( WeightLiteral(x, 2) );
144 min.push_back( WeightLiteral(y, 3) );
168 min.push_back( WeightLiteral(a, 1) );
[all …]
H A Dweight_constraint_test.cpp335 wlits.push_back(WeightLiteral(a, 4));
336 wlits.push_back(WeightLiteral(~b, 2));
337 wlits.push_back(WeightLiteral(~c, 1));
338 wlits.push_back(WeightLiteral(d, 1));
340 wlits.assign(1, WeightLiteral(a, 2));
345 wlits.assign(1, WeightLiteral(a, 2));
397 wlits.push_back(WeightLiteral(a, 1));
398 wlits.push_back(WeightLiteral(b, 1));
399 wlits.push_back(WeightLiteral(c, 1));
400 wlits.push_back(WeightLiteral(d, 1));
[all …]
H A Dparser_test.cpp199 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(3), 0)) != m1->lits + 2);
200 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(api.getLiteral(4), 0)) != m1->lits + 2);
201 …REQUIRE(std::find(m1->lits + 2, m1->lits + 4, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + …
257 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(1), 1)) != m1->lits + 2);
258 REQUIRE(std::find(m1->lits, m1->lits + 2, WeightLiteral(~api.getLiteral(2), 1)) != m1->lits + 2);
268 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(1), 1)) != m2->lits + 2);
269 REQUIRE(std::find(m2->lits, m2->lits + 2, WeightLiteral(api.getLiteral(2), 1)) != m2->lits + 2);
789 REQUIRE(wLits->lits[0] == WeightLiteral(posLit(2), 4));
790 REQUIRE(wLits->lits[1] == WeightLiteral(posLit(1), 2));
791 REQUIRE(wLits->lits[2] == WeightLiteral(negLit(4), 2));
[all …]
H A Dprogram_builder_test.cpp2321 con.push_back(WeightLiteral(posLit(1), 2));
2324 con.push_back(WeightLiteral(posLit(4), 1));
2325 con.push_back(WeightLiteral(posLit(5), 1));
2369 con.push_back(WeightLiteral(posLit(1), 1));
2371 con.assign(1, WeightLiteral(posLit(1), 1));
2378 con.push_back(WeightLiteral(posLit(1), 1));
2380 con.assign(1, WeightLiteral(posLit(1), 3));
2381 con.push_back(WeightLiteral(posLit(2), 2));
2388 con.push_back(WeightLiteral(posLit(1), 3));
2389 con.push_back(WeightLiteral(posLit(2), 2));
[all …]
/dports/math/clingo/clingo-5.5.1/clasp/clasp/
H A Dminimize_constraint.h163 …void add(wsum_t* lhs, const WeightLiteral& lit) const { if (weights.empty()) *lhs += lit.second; e… in add()
166 …void sub(wsum_t* lhs, const WeightLiteral& lit, uint32& aLev) const { if (weights.empty()) *lhs -=… in sub()
169 bool imp(wsum_t* lhs, const WeightLiteral& lit, const wsum_t* rhs, uint32& lev) const { in imp()
174 weight_t weight(const WeightLiteral& lit, uint32 lev) const { in weight()
195 WeightLiteral lits[0]; // (shared) literals - terminated with lit_true()
213 MinimizeBuilder& add(weight_t prio, WeightLiteral lit);
235 MLit(const WeightLiteral& wl, weight_t at) : lit(wl.first), prio(at), weight(wl.second) {} in MLit()
396 typedef const WeightLiteral* Iter;
409 uint32 computeImplicationSet(const Solver& s, const WeightLiteral& it, uint32& undoPos);
475 typedef WeightLiteral* Ptr;
[all …]
H A Dliteral.h207 typedef std::pair<Literal, weight_t> WeightLiteral; //!< A literal associated with a weight. typedef
208 typedef PodVector<WeightLiteral>::type WeightLitVec; //!< A vector of weight-literals.
/dports/math/clasp/clasp-3.3.5/clasp/
H A Dminimize_constraint.h163 …void add(wsum_t* lhs, const WeightLiteral& lit) const { if (weights.empty()) *lhs += lit.second; e… in add()
166 …void sub(wsum_t* lhs, const WeightLiteral& lit, uint32& aLev) const { if (weights.empty()) *lhs -=… in sub()
169 bool imp(wsum_t* lhs, const WeightLiteral& lit, const wsum_t* rhs, uint32& lev) const { in imp()
174 weight_t weight(const WeightLiteral& lit, uint32 lev) const { in weight()
195 WeightLiteral lits[0]; // (shared) literals - terminated with lit_true()
213 MinimizeBuilder& add(weight_t prio, WeightLiteral lit);
235 MLit(const WeightLiteral& wl, weight_t at) : lit(wl.first), prio(at), weight(wl.second) {} in MLit()
396 typedef const WeightLiteral* Iter;
409 uint32 computeImplicationSet(const Solver& s, const WeightLiteral& it, uint32& undoPos);
475 typedef WeightLiteral* Ptr;
[all …]
H A Dliteral.h207 typedef std::pair<Literal, weight_t> WeightLiteral; //!< A literal associated with a weight. typedef
208 typedef PodVector<WeightLiteral>::type WeightLitVec; //!< A vector of weight-literals.
/dports/math/clingo/clingo-5.5.1/clasp/clasp-da10954/clasp/
H A Dminimize_constraint.h163 …void add(wsum_t* lhs, const WeightLiteral& lit) const { if (weights.empty()) *lhs += lit.second; e… in add()
166 …void sub(wsum_t* lhs, const WeightLiteral& lit, uint32& aLev) const { if (weights.empty()) *lhs -=… in sub()
169 bool imp(wsum_t* lhs, const WeightLiteral& lit, const wsum_t* rhs, uint32& lev) const { in imp()
174 weight_t weight(const WeightLiteral& lit, uint32 lev) const { in weight()
195 WeightLiteral lits[0]; // (shared) literals - terminated with lit_true()
213 MinimizeBuilder& add(weight_t prio, WeightLiteral lit);
235 MLit(const WeightLiteral& wl, weight_t at) : lit(wl.first), prio(at), weight(wl.second) {} in MLit()
396 typedef const WeightLiteral* Iter;
409 uint32 computeImplicationSet(const Solver& s, const WeightLiteral& it, uint32& undoPos);
475 typedef WeightLiteral* Ptr;
[all …]
H A Dliteral.h207 typedef std::pair<Literal, weight_t> WeightLiteral; //!< A literal associated with a weight. typedef
208 typedef PodVector<WeightLiteral>::type WeightLitVec; //!< A vector of weight-literals.
/dports/math/clasp/clasp-3.3.5/src/
H A Dprogram_builder.cpp83 void ProgramBuilder::addMinLit(weight_t prio, WeightLiteral x) { in addMinLit()
168 for (const WeightLiteral* x = rep.lits, *end = rep.lits + rep.size; x != end; ++x) { in addConstraint()
200 addMinLit(0, WeightLiteral(relax.unflag(), w)); in doEndProgram()
240 addMinLit(0, WeightLiteral(negLit(eqVar), cw)); in addConstraint()
245 addMinLit(0, WeightLiteral(~lits[0].first, cw)); in addConstraint()
366 …, end = Potassco::end(body); it != end; ++it) { constraint_.push_back(WeightLiteral(~toLit(*it), 1… in rule()
376 constraint_.push_back(WeightLiteral(~toLit(it->lit), it->weight)); in rule()
390 …, end = Potassco::end(lits); it != end; ++it) { constraint_.push_back(WeightLiteral(toLit(it->lit)… in minimize()
H A Dminimize_constraint.cpp55 const WeightLiteral* lit = lits; in resetBounds()
61 for (const WeightLiteral* t = lit; t->second == wPos; ++t) { in resetBounds()
210 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in destroy()
571 MinimizeBuilder& MinimizeBuilder::add(weight_t prio, WeightLiteral lit) { in add()
576 lits_.push_back(MLit(WeightLiteral(lit_true(), w), prio)); in add()
585 for (const WeightLiteral* it = con.lits; !isSentinel(it->first); ++it) { in add()
652 *j++ = MLit(WeightLiteral(x, static_cast<weight_t>(w)), L); in prepareLevels()
696 WeightLiteral x(lits_[i].lit, lits_[i].weight); in createShared()
710 ret->lits[nLits] = WeightLiteral(lit_true(), (weight_t)ret->weights.size()); in createShared()
876 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in initLevel()
[all …]
H A Dparser.cpp263 …min.push_back(WeightLiteral(lit, matchInt(CLASP_WEIGHT_T_MIN, CLASP_WEIGHT_T_MAX, "minweight: weig… in parseExt()
330 wlc.push_back(WeightLiteral(*it, sign)); in doParse()
443 active_.lits.push_back(WeightLiteral(x, coeff)); in parseSum()
/dports/math/clingo/clingo-5.5.1/clasp/clasp-da10954/src/
H A Dprogram_builder.cpp83 void ProgramBuilder::addMinLit(weight_t prio, WeightLiteral x) { in addMinLit()
168 for (const WeightLiteral* x = rep.lits, *end = rep.lits + rep.size; x != end; ++x) { in addConstraint()
200 addMinLit(0, WeightLiteral(relax.unflag(), w)); in doEndProgram()
240 addMinLit(0, WeightLiteral(negLit(eqVar), cw)); in addConstraint()
245 addMinLit(0, WeightLiteral(~lits[0].first, cw)); in addConstraint()
366 …, end = Potassco::end(body); it != end; ++it) { constraint_.push_back(WeightLiteral(~toLit(*it), 1… in rule()
376 constraint_.push_back(WeightLiteral(~toLit(it->lit), it->weight)); in rule()
390 …, end = Potassco::end(lits); it != end; ++it) { constraint_.push_back(WeightLiteral(toLit(it->lit)… in minimize()
H A Dminimize_constraint.cpp55 const WeightLiteral* lit = lits; in resetBounds()
61 for (const WeightLiteral* t = lit; t->second == wPos; ++t) { in resetBounds()
210 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in destroy()
571 MinimizeBuilder& MinimizeBuilder::add(weight_t prio, WeightLiteral lit) { in add()
576 lits_.push_back(MLit(WeightLiteral(lit_true(), w), prio)); in add()
585 for (const WeightLiteral* it = con.lits; !isSentinel(it->first); ++it) { in add()
652 *j++ = MLit(WeightLiteral(x, static_cast<weight_t>(w)), L); in prepareLevels()
696 WeightLiteral x(lits_[i].lit, lits_[i].weight); in createShared()
710 ret->lits[nLits] = WeightLiteral(lit_true(), (weight_t)ret->weights.size()); in createShared()
876 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in initLevel()
[all …]
/dports/math/clingo/clingo-5.5.1/clasp/src/
H A Dprogram_builder.cpp83 void ProgramBuilder::addMinLit(weight_t prio, WeightLiteral x) { in addMinLit()
168 for (const WeightLiteral* x = rep.lits, *end = rep.lits + rep.size; x != end; ++x) { in addConstraint()
200 addMinLit(0, WeightLiteral(relax.unflag(), w)); in doEndProgram()
240 addMinLit(0, WeightLiteral(negLit(eqVar), cw)); in addConstraint()
245 addMinLit(0, WeightLiteral(~lits[0].first, cw)); in addConstraint()
366 …, end = Potassco::end(body); it != end; ++it) { constraint_.push_back(WeightLiteral(~toLit(*it), 1… in rule()
376 constraint_.push_back(WeightLiteral(~toLit(it->lit), it->weight)); in rule()
390 …, end = Potassco::end(lits); it != end; ++it) { constraint_.push_back(WeightLiteral(toLit(it->lit)… in minimize()
H A Dminimize_constraint.cpp55 const WeightLiteral* lit = lits; in resetBounds()
61 for (const WeightLiteral* t = lit; t->second == wPos; ++t) { in resetBounds()
210 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in destroy()
571 MinimizeBuilder& MinimizeBuilder::add(weight_t prio, WeightLiteral lit) { in add()
576 lits_.push_back(MLit(WeightLiteral(lit_true(), w), prio)); in add()
585 for (const WeightLiteral* it = con.lits; !isSentinel(it->first); ++it) { in add()
652 *j++ = MLit(WeightLiteral(x, static_cast<weight_t>(w)), L); in prepareLevels()
696 WeightLiteral x(lits_[i].lit, lits_[i].weight); in createShared()
710 ret->lits[nLits] = WeightLiteral(lit_true(), (weight_t)ret->weights.size()); in createShared()
876 for (const WeightLiteral* it = shared_->lits; !isSentinel(it->first); ++it) { in initLevel()
[all …]

123