MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / addChildren

Method addChildren

cp-profiler/src/cpprofiler/tree/structure.cpp:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void Structure::addChildren(NodeID nid, int kids)
76{
77 if (nodes_[nid]->childrenCount() > 0)
78 throw;
79
80 nodes_[nid]->setNumberOfChildren(kids);
81
82 for (auto i = 0; i < kids; ++i)
83 {
84 createChild(nid, i, 0);
85 }
86}
87
88/// Remove `alt` child of `pid`
89void Structure::removeChild(NodeID pid, int alt)

Callers 1

promoteNodeMethod · 0.80

Calls 2

setNumberOfChildrenMethod · 0.80
childrenCountMethod · 0.45

Tested by

no test coverage detected