Sha256: b0a07580eb197916e5da27b8bc6effd065a690454287a2bf75bee0210fa7ba3d

Contents?: true

Size: 1.67 KB

Versions: 1

Compression:

Stored size: 1.67 KB

Contents

/*
 *  Main authors:
 *     Christian Schulte <schulte@gecode.org>
 *     Mikael Lagerkvist <lagerkvist@gecode.org>
 *
 *  Copyright:
 *     Christian Schulte, 2005
 *     Mikael Lagerkvist, 2005
 *
 *  Last modified:
 *     $Date: 2006-08-04 16:07:12 +0200 (Fri, 04 Aug 2006) $ by $Author: schulte $
 *     $Revision: 3518 $
 *
 *  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.
 *
 */

#ifndef __GECODE_TEST_STRESS_HH__
#define __GECODE_TEST_STRESS_HH__

#include "gecode/kernel.hh"
#include "gecode/int.hh"
#include "test.hh"

using namespace Gecode;
using namespace Int;

class StressTestSpace : public Space {
public:
  IntVarArray x;
private:
  const Options opt;
public:
  StressTestSpace(int n, IntSet dom, const Options& o);
  StressTestSpace(bool share, StressTestSpace& s);
  virtual Space* copy(bool share);
  bool is_failed(void);
};

enum CheckResult {
  CR_OK,
  CR_FOS,
  CR_SOF,
  CR_UNSPEC
};

class StressTest : public Test {
protected:
  IntSetValues param;
public:
  StressTest(const char* t, const IntSet& p)
    : Test("Stress", t), param(p) {}
  // Check for solution
  virtual CheckResult check(const StressTestSpace *s) const = 0;
  // Run test-space
  virtual StressTestSpace *run(StressTestSpace *s) const;
  // Create propagators
  virtual void initialize(Space* home, IntVarArray& x, int param) = 0;
  virtual int    vars(int param) = 0;
  virtual IntSet dom(int param)  = 0;
  // Perform test
  virtual bool run(const Options& opt);
};

#endif

// STATISTICS: test-stress

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gecoder-with-gecode-0.7.1 ext/gecode-1.3.1/test/stress.hh