one step close to use one solver instatiation to solve several queries

This commit is contained in:
Tiago Gomes
2012-11-14 23:13:46 +00:00
parent b673dfd462
commit 4522850cd6
7 changed files with 35 additions and 10 deletions

View File

@@ -9,8 +9,7 @@ ParfactorList::ParfactorList (const ParfactorList& pfList)
while (it != pfList.end()) {
addShattered (new Parfactor (**it));
++ it;
}
}
}
@@ -126,6 +125,27 @@ ParfactorList::print (void) const
ParfactorList&
ParfactorList::operator= (const ParfactorList& pfList)
{
if (this != &pfList) {
ParfactorList::const_iterator it0 = pfList_.begin();
while (it0 != pfList_.end()) {
delete *it0;
++ it0;
}
pfList_.clear();
ParfactorList::const_iterator it = pfList.begin();
while (it != pfList.end()) {
addShattered (new Parfactor (**it));
++ it;
}
}
return *this;
}
bool
ParfactorList::isShattered (const Parfactor* g) const
{