NB6_Hazards/Hazard/Hazard/Implikant_localisation.h
Jonny007-MKD fec5f7b828 Gute Idee!
1. i, h, w müssen public sein
2. numVarX muss nicht jedes mal gespeichert werden
3. noch mehr push_backs für I_Vector
2013-12-19 03:14:14 +01:00

39 lines
665 B
C++

#include "stdafx.h"
#include <string>
#include <vector>
#include "PrimImplikant.h"
using namespace std;
extern uint dimension;
extern uint numElements;
extern bool KNF;
#ifndef IMPLIKANT_LOC
#define IMPLIKANT_LOC
class Implikant_localisation{
private:
void setElement(uint &currentI)
{
uint numVarX = (uint)floor(dimension / 2.0f);
this->i = currentI;
this->w = (currentI & ((0x1 << (numVarX)) - 1)) ^ ((currentI & ((0x1 << (numVarX)) - 1)) / 2); // w^=w/2
this->h = (currentI >> numVarX) ^ ((currentI >> numVarX) / 2);
}
public:
uint i;
uint w;
uint h;
Implikant_localisation(uint &currentI)
{
setElement(currentI);
}
};
#endif;