NB6_Hazards/Hazard/Hazard/Cell.h
Jonny007-MKD 8d82eb87e4 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.
2013-11-14 14:53:15 +01:00

29 lines
591 B
C++

#include <string>
#include <vector>
#include "PrimImplikantCollection.h"
using namespace std;
#ifndef CELL
#define CELL
class Cell {
public:
bool value;
unsigned int index;
vector<Cell*> GetNeighbors(); // returns numElements Cells
vector<Cell*> GetHazards(); // returns the neighbor Cells which are hazardous
Cell(unsigned int index, PrimImplikantCollection* &globalPIC)
{
this->index = index;
this->primImplikanten = globalPIC->primImplikantenAt(index);
this->value = this->primImplikanten.size() > 0;
}
private:
PrimImplikantCollection primImplikanten;
};
#endif