| 131 | |
| 132 | template <typename T> |
| 133 | bool HeuristicTree::add_leaf(NodeID id, T val) |
| 134 | { |
| 135 | if (_tree.size() >= _max_num_nodes) |
| 136 | { |
| 137 | ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("Exceeding the maximum number of nodes allowed %zu", _max_num_nodes); |
| 138 | return false; |
| 139 | } |
| 140 | if (_tree.find(id) != _tree.end()) |
| 141 | { |
| 142 | ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE("Cannot add node; node id %zu already exists", id); |
| 143 | return false; |
| 144 | } |
| 145 | _tree[id] = std::make_unique<LeafNode<T>>(id, val); |
| 146 | return true; |
| 147 | } |
| 148 | |
| 149 | bool HeuristicTree::add_branch(NodeID id, Condition cond, NodeID t_node, NodeID f_node) |
| 150 | { |
no test coverage detected