MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / add_node_

Method add_node_

mlx/data/core/Graph.cpp:14–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace core {
13GraphBase::GraphBase() {}
14int64_t GraphBase::add_node_() {
15 int64_t id = nodes_.size();
16 nodes_.resize(id + 1);
17 return id;
18}
19int64_t GraphBase::add_edge_(int64_t inode, int64_t onode) {
20 if (inode < 0 || inode >= nodes_.size()) {
21 throw std::runtime_error("Graph: invalid input node");

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected