Changed header of Cell: HasHazard() -> GetHazards()

Da wir mit unserem Ergebnis ja arbeiten wollen, muss die
Hazard-Finde-Funktion zurückgeben, wo ein Hazard aufgetreten ist. Da
jedoch um jede Zelle herum mehrere Hazards auftreten können, muss der
Rückgabewert ein vector sein.
This commit is contained in:
Jonny007-MKD 2013-11-14 14:53:15 +01:00
parent 7da5e0ff86
commit 8d82eb87e4

View file

@ -10,11 +10,12 @@ using namespace std;
class Cell { class Cell {
public: public:
bool value; bool value;
unsigned int index;
vector<Cell> GetNeighbours(); vector<Cell*> GetNeighbors(); // returns numElements Cells
bool HasHazard(); vector<Cell*> GetHazards(); // returns the neighbor Cells which are hazardous
Cell(int index, PrimImplikantCollection* &globalPIC) Cell(unsigned int index, PrimImplikantCollection* &globalPIC)
{ {
this->index = index; this->index = index;
this->primImplikanten = globalPIC->primImplikantenAt(index); this->primImplikanten = globalPIC->primImplikantenAt(index);
@ -23,7 +24,6 @@ public:
private: private:
PrimImplikantCollection primImplikanten; PrimImplikantCollection primImplikanten;
int index;
}; };
#endif #endif