KGuard

class KGuard : public KConstraint

This class creates an implication on two constraints C1 ==> C2

Example :

// C1     C2       C1 ==> C2
// -------------------------
// false  false    true
// false  true     true
// true   false    false
// true   true     true

KIntVar X(...);
KIntVar Y(...);
KIntVar Z(...);

problem.post( KGuard( X <= Y + 3 , Z > 4 )  );

See

KConstraint

Since

2016.1

Public Functions

KGuard(const KConstraint &c1, const KConstraint &c2)

Primary constructor

Parameters
  • c1 – the left part constraint in c1 ==> c2

  • c2 – the right part constraint in c1 ==> c2

KGuard(const KGuard &toCopy)

Copy constructor

~KGuard()

Destructor.