00001 00002 // 00003 // Copyright (c) 2005 Model-based Embedded and Robotic Systems Group 00004 // All Rights Reserved Massachusetts Institute of Technology 00005 // 00006 // This software is provided as is. Model-based Embedded and Robotic Systems 00007 // (MERS) group does not assume any responsibility. 00008 // 00009 // Organization: Model-based Embedded and Robotic Systems Group 00010 // Massachusetts Institute of Technology 00011 // 00013 00014 #ifndef __IMPLICANTNOMPI__ 00015 #define __IMPLICANTNOMPI__ 00016 00017 #include <iostream> 00018 #include <vector> 00019 00020 #include <Mers/Generators/BFIG/BFIGImplicant.h> 00021 00022 namespace Mers { 00023 namespace Generators { 00024 namespace BFIG { 00025 00026 class BFIGImplicant; 00027 class BFIGVariable; 00028 class BFIGAssignment; 00029 class BFIGConstraint; 00030 class BFIGObjectiveFunction; 00031 00046 class BFIGImplicantNoMPI : public Mers::Generators::BFIG::BFIGImplicant 00047 { 00048 00049 00050 public: 00051 00052 //----------------------------------------------- 00053 // CONSTRUCTOR 00054 //----------------------------------------------- 00055 00056 BFIGImplicantNoMPI(const BFIGImplicant & i); 00057 BFIGImplicantNoMPI(std::vector<BFIGConstraint const *> const & unentailedConflictsList, 00058 BFIGObjectiveFunction const * of = NULL); 00062 virtual ~BFIGImplicantNoMPI(); 00063 00064 //----------------------------------------------- 00065 // PUBLIC METHODS 00066 //----------------------------------------------- 00067 00073 //virtual void addAssignment(BFIGAssignment const * a); 00074 00075 00083 virtual double getBestCost() const; 00091 virtual double getTrueCost() const; 00092 00104 virtual std::vector<BFIGImplicant *> 00105 generateChildren(std::vector<BFIGVariable *> const * varSet = NULL); 00106 00113 virtual BFIGImplicant * generateSibling(); 00114 00116 virtual void updateBestCost(); 00117 00118 friend std::ostream& operator<<(std::ostream&, BFIGImplicantNoMPI const &); 00119 00120 protected: 00121 00122 BFIGImplicantNoMPI(BFIGImplicant const * i, 00123 BFIGAssignment const * extraAssignment); 00124 BFIGImplicantNoMPI(BFIGImplicant * i, BFIGAssignment const * extraAssignment, 00125 std::vector<BFIGAssignment const *> siblingAssigns); 00126 00127 //----------------------------------------------- 00128 // PRIVATE DATA MEMBERS 00129 //----------------------------------------------- 00130 }; 00131 } 00132 } 00133 } 00134 00135 #endif //ndef __IMPLICANTNOMPI__ 00136
1.5.0