MCPcopy
hub / github.com/waleedka/hiddenlayer / add_node

Method add_node

hiddenlayer/graph.py:204–207  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

202 return node.id if hasattr(node, "id") else hash(node)
203
204 def add_node(self, node):
205 id = self.id(node)
206 # assert(id not in self.nodes)
207 self.nodes[id] = node
208
209 def add_edge(self, node1, node2, label=None):
210 # If the edge is already present, don't add it again.

Callers 11

replaceMethod · 0.95
test_directed_graphMethod · 0.95
test_basicsMethod · 0.95
test_searchMethod · 0.95
test_regexMethod · 0.95
test_foldMethod · 0.95
test_parallel_foldMethod · 0.95
test_pruneMethod · 0.95
test_prune_branchMethod · 0.95
import_graphFunction · 0.80
import_graphFunction · 0.80

Calls 1

idMethod · 0.95

Tested by 8

test_directed_graphMethod · 0.76
test_basicsMethod · 0.76
test_searchMethod · 0.76
test_regexMethod · 0.76
test_foldMethod · 0.76
test_parallel_foldMethod · 0.76
test_pruneMethod · 0.76
test_prune_branchMethod · 0.76