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

Method set_as_main

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

Applies [Context::set_main_graph] to the parent context and `this` graph. Returns the clone of `this`. # Returns This graph # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{array_type, INT32}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = array_type(vec![3, 2], INT32); let n = g.input(t).unwrap(); n.set_as_output()

(&self)

Source from the content-addressed store, hash-verified

1475 /// g.set_as_main().unwrap();
1476 /// ```
1477 pub fn set_as_main(&self) -> Result<Graph> {
1478 self.get_context().set_main_graph(self.clone())?;
1479 Ok(self.clone())
1480 }
1481
1482 /// Applies [Context::set_graph_name] to the parent context and `this` graph. Returns the clone of `this`.
1483 ///

Callers 15

process_nodeMethod · 0.45
process_instantiationFunction · 0.45
run_instantiation_passFunction · 0.45
simple_contextFunction · 0.45
multiply_helperFunction · 0.45
overflow_helperFunction · 0.45
test_resharingFunction · 0.45
test_resharingFunction · 0.45
test_minimum_helperFunction · 0.45

Calls 3

cloneMethod · 0.80
set_main_graphMethod · 0.45
get_contextMethod · 0.45

Tested by 10

test_resharingFunction · 0.36
test_resharingFunction · 0.36
test_minimum_helperFunction · 0.36
test_millionaires_helperFunction · 0.36
test_matmul_helperFunction · 0.36
test_no_dangling_nodesFunction · 0.36
test_dangling_nodesFunction · 0.36
test_no_dupsFunction · 0.36
test_some_dupsFunction · 0.36