Skip to content
Snippets Groups Projects
Commit dc1fe726 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Implement proposal in #212

parent 1de56521
No related branches found
No related tags found
4 merge requests!414Update version 0.5.1 -> 0.6.0,!408[Add] Dropout Operator,!341Error,!334Implement proposal in #212
Pipeline #65572 failed
......@@ -1115,6 +1115,10 @@ void Aidge::GraphView::insertParent(NodePtr childNode,
}
bool Aidge::GraphView::replace(const std::set<Aidge::NodePtr>& oldNodes, const std::set<Aidge::NodePtr>& newNodes) {
AIDGE_ASSERT(!(oldNodes.size() > 1 && newNodes.size() > 1),
"GraphView::replace(): old and new sets cannot both have more than one node (here: {} and {} respectively). Use GraphView instead of set in this case.",
oldNodes.size(), newNodes.size());
// (1) create GraphViews from both sets of Nodes
auto oldG = std::make_shared<GraphView>("oldG");
oldG->add(oldNodes, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment