NB6_Hazards/GDE_3_2008/Cell.h
gaeltp3 7a52e186d9 Verbindung von GDE mit unserem Projekt Hazard
im Ordner GDE_3_Hazard. Ab nun koennen wir weiter in diesem Ordner
programmieren.
2013-11-28 16:08:16 +01:00

30 lines
755 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(vector<Cell*> &allCells); // returns numElements Cells
vector<Cell*>* getHazards(vector<Cell*> &allCells); // returns the neighbor Cells which are hazardous
bool hasOneOfThose(PrimImplikantCollection &foreignPIC);
void refresh(PrimImplikantCollection* &globalPIC); // refreshes the local primImplikantCollection
Cell(unsigned int index, PrimImplikantCollection* &globalPIC)
{
this->index = index;
this->refresh(globalPIC);
this->value = this->primImplikanten.size() > 0;
}
PrimImplikantCollection primImplikanten;
};
#endif