cb_enumerator.h
Go to the documentation of this file.
00001 // 
00002 // Copyright (c) 2006-2011, Benjamin Kaufmann
00003 // 
00004 // This file is part of Clasp. See http://www.cs.uni-potsdam.de/clasp/ 
00005 // 
00006 // Clasp is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 2 of the License, or
00009 // (at your option) any later version.
00010 // 
00011 // Clasp is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 // 
00016 // You should have received a copy of the GNU General Public License
00017 // along with Clasp; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 #ifndef CLASP_CB_ENUMERATOR_H
00021 #define CLASP_CB_ENUMERATOR_H
00022 
00023 #ifdef _MSC_VER
00024 #pragma once
00025 #endif
00026 
00027 #include <clasp/enumerator.h>
00028 
00029 namespace Clasp {
00030 
00032 
00035 class CBConsequences : public Enumerator {
00036 public:
00037         enum Consequences_t { 
00038                 brave_consequences    = (Model::max_value << 1) | Model::model_cons,
00039                 cautious_consequences = (Model::max_value << 2) | Model::model_cons,
00040         };
00044         explicit CBConsequences(Consequences_t type);
00045         ~CBConsequences();
00046         int  modelType() const { return type_; }
00047         bool exhaustive()const { return true; }
00048 private:
00049         class  CBFinder;
00050         class  SharedConstraint;
00051         ConPtr doInit(SharedContext& ctx, MinimizeConstraint* m, int numModels);
00052         void   addCurrent(Solver& s, LitVec& con, ValueVec& m);
00053         LitVec            cons_;
00054         SharedConstraint* shared_;
00055         Consequences_t    type_;
00056 };
00057 
00058 }
00059 #endif


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:38