Sha256: 7cc2f678ab615e0f4d8b40e9a0484fbd4316abaf29d6341257dde725a2244bcd

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

/*
 *  Main authors:
 *     Christian Schulte <schulte@gecode.org>
 *
 *  Copyright:
 *     Christian Schulte, 2005
 *
 *  Last modified:
 *     $Date: 2006-08-04 16:05:26 +0200 (Fri, 04 Aug 2006) $ by $Author: schulte $
 *     $Revision: 3513 $
 *
 *  This file is part of Gecode, the generic constraint
 *  development environment:
 *     http://www.gecode.org
 *
 *  See the file "LICENSE" for information on usage and
 *  redistribution of this file, and for a
 *     DISCLAIMER OF ALL WARRANTIES.
 *
 */

namespace Gecode {

  namespace MiniModel {

    /*
     * Operations for Boolean relations
     *
     */
    forceinline
    BoolRel::BoolRel(const BoolExpr& e0, bool t0)
      : e(e0), t(t0) {}

    forceinline void
    BoolRel::post(Space* home) const {
      e.post(home,t);
    }

  }

  /*
   * Construction of linear relations
   *
   */
  inline MiniModel::BoolRel
  tt(const MiniModel::BoolExpr& e) {
    return MiniModel::BoolRel(e,true);
  }
  inline MiniModel::BoolRel
  ff(const MiniModel::BoolExpr& e) {
    return MiniModel::BoolRel(e,false);
  }

  /*
   * Posting
   *
   */
  inline void
  post(Space* home, const MiniModel::BoolRel& r, IntConLevel) {
    if (home->failed()) return;
    r.post(home);
  }

}

// STATISTICS: minimodel-any

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gecoder-with-gecode-0.7.1 ext/gecode-1.3.1/gecode/minimodel/bool-rel.icc