MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / call

Method call

ciphercore-base/src/graphs.rs:2971–2973  ·  view source on GitHub ↗

Adds a node that calls another graph with inputs contained in given nodes. The input graph must be finalized and have as many inputs as the number of provided arguments. For example, let `G` be a graph implementing the function `max(x,0)`, then `call(G, [17]) = max(17, 0)`. # Arguments `graph` - graph with `n` input nodes `arguments` - vector of `n` nodes # Returns New call node # Example

(&self, graph: Graph, arguments: Vec<Node>)

Source from the content-addressed store, hash-verified

2969 /// let n6 = g2.call(g1, vec![n5]).unwrap();
2970 /// ```
2971 pub fn call(&self, graph: Graph, arguments: Vec<Node>) -> Result<Node> {
2972 self.add_node(arguments, vec![graph], Operation::Call)
2973 }
2974
2975 /// Adds a node that iteratively computes a given finalized graph on the elements of a given vector and updates the state value accordingly.
2976 ///

Callers 15

test_call_workerFunction · 0.45
test_call_worker_failFunction · 0.45
run_instantiation_passFunction · 0.45
test_instantiation_passFunction · 0.45
call_iterate_testFunction · 0.45
context_generatorsFunction · 0.45
instantiateMethod · 0.45
instantiateMethod · 0.45
instantiateMethod · 0.45
instantiateMethod · 0.45
add_3_bitstringsFunction · 0.45

Calls 1

add_nodeMethod · 0.80

Tested by 11

test_call_workerFunction · 0.36
test_call_worker_failFunction · 0.36
test_instantiation_passFunction · 0.36
call_iterate_testFunction · 0.36
test_noopFunction · 0.36
test_inline_call_simpleFunction · 0.36
test_inline_iterateFunction · 0.36
test_nested_iterateFunction · 0.36