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:
		
							parent
							
								
									7da5e0ff86
								
							
						
					
					
						commit
						8d82eb87e4
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -10,11 +10,12 @@ using namespace std;
 | 
			
		|||
class Cell {
 | 
			
		||||
public:
 | 
			
		||||
	bool value;
 | 
			
		||||
	unsigned int index;
 | 
			
		||||
 | 
			
		||||
	vector<Cell> GetNeighbours();
 | 
			
		||||
	bool HasHazard();
 | 
			
		||||
	vector<Cell*> GetNeighbors();			// returns numElements Cells
 | 
			
		||||
	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->primImplikanten = globalPIC->primImplikantenAt(index);
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +24,6 @@ public:
 | 
			
		|||
 | 
			
		||||
private:
 | 
			
		||||
	PrimImplikantCollection primImplikanten;
 | 
			
		||||
	int index;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Loading…
	
		Reference in a new issue