Change way of ID generation
This commit is contained in:
parent
e14e3b15d8
commit
d31fba386d
2 changed files with 5 additions and 3 deletions
|
@ -14,21 +14,21 @@ void PrimImplikantCollection::add(string input)
|
||||||
{
|
{
|
||||||
PrimImplikant* PI = new PrimImplikant(input);
|
PrimImplikant* PI = new PrimImplikant(input);
|
||||||
|
|
||||||
PI->id = this->size();
|
PI->id = PrimImplikantCollection::globalCount++;
|
||||||
this->setgroupCollection1(PI);
|
this->setgroupCollection1(PI);
|
||||||
this->add(PI);
|
this->add(PI);
|
||||||
}
|
}
|
||||||
void PrimImplikantCollection::add(uint input)
|
void PrimImplikantCollection::add(uint input)
|
||||||
{
|
{
|
||||||
PrimImplikant* PI = new PrimImplikant(input);
|
PrimImplikant* PI = new PrimImplikant(input);
|
||||||
PI->id = this->size();
|
PI->id = PrimImplikantCollection::globalCount++;
|
||||||
this->setgroupCollection1(PI);
|
this->setgroupCollection1(PI);
|
||||||
this->add(PI);
|
this->add(PI);
|
||||||
}
|
}
|
||||||
void PrimImplikantCollection::add(uint input1, uint input2)
|
void PrimImplikantCollection::add(uint input1, uint input2)
|
||||||
{
|
{
|
||||||
PrimImplikant* PI = new PrimImplikant(input1, input2);
|
PrimImplikant* PI = new PrimImplikant(input1, input2);
|
||||||
PI->id = this->size();
|
PI->id = PrimImplikantCollection::globalCount++;
|
||||||
this->setgroupCollection1(PI);
|
this->setgroupCollection1(PI);
|
||||||
this->add(PI);
|
this->add(PI);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ public:
|
||||||
PrimImplikant* operator[](uint &index);
|
PrimImplikant* operator[](uint &index);
|
||||||
private:
|
private:
|
||||||
vector<PrimImplikant*> PIVector;
|
vector<PrimImplikant*> PIVector;
|
||||||
|
|
||||||
|
static uint globalCount = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in a new issue