refactor ground solver interface

This commit is contained in:
Tiago Gomes
2012-04-10 15:00:18 +01:00
parent 46e6a10625
commit 78e86a6330
15 changed files with 191 additions and 242 deletions

View File

@@ -34,7 +34,6 @@ ElimGraph::ElimGraph (const vector<Factor*>& factors)
}
}
}
setIndexes();
}
@@ -148,6 +147,7 @@ void
ElimGraph::addNode (EgNode* n)
{
nodes_.push_back (n);
n->setIndex (nodes_.size() - 1);
varMap_.insert (make_pair (n->varId(), n));
}
@@ -301,13 +301,3 @@ ElimGraph::neighbors (const EgNode* n1, const EgNode* n2) const
return false;
}
void
ElimGraph::setIndexes (void)
{
for (unsigned i = 0; i < nodes_.size(); i++) {
nodes_[i]->setIndex (i);
}
}