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);
|
||||
|
||||
PI->id = this->size();
|
||||
PI->id = PrimImplikantCollection::globalCount++;
|
||||
this->setgroupCollection1(PI);
|
||||
this->add(PI);
|
||||
}
|
||||
void PrimImplikantCollection::add(uint input)
|
||||
{
|
||||
PrimImplikant* PI = new PrimImplikant(input);
|
||||
PI->id = this->size();
|
||||
PI->id = PrimImplikantCollection::globalCount++;
|
||||
this->setgroupCollection1(PI);
|
||||
this->add(PI);
|
||||
}
|
||||
void PrimImplikantCollection::add(uint input1, uint input2)
|
||||
{
|
||||
PrimImplikant* PI = new PrimImplikant(input1, input2);
|
||||
PI->id = this->size();
|
||||
PI->id = PrimImplikantCollection::globalCount++;
|
||||
this->setgroupCollection1(PI);
|
||||
this->add(PI);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ public:
|
|||
PrimImplikant* operator[](uint &index);
|
||||
private:
|
||||
vector<PrimImplikant*> PIVector;
|
||||
|
||||
static uint globalCount = 0;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue