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

Method set_name

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

Applies [Context::set_node_name] to the parent context and `this` node. Returns the clone of `this`. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{scalar_type, BIT}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = scalar_type(BIT); let n = g.input(t).unwrap(); n.set_name("XOR").unwrap(); ```

(&self, name: &str)

Source from the content-addressed store, hash-verified

528 /// n.set_name("XOR").unwrap();
529 /// ```
530 pub fn set_name(&self, name: &str) -> Result<Node> {
531 self.get_graph()
532 .get_context()
533 .set_node_name(self.clone(), name)?;
534 Ok(self.clone())
535 }
536
537 /// Applies [Context::get_node_name] to the parent context and `this` node.
538 ///

Callers 15

run_instantiation_passFunction · 0.45
test_instantiation_passFunction · 0.45
copy_node_nameFunction · 0.45
context_generatorsFunction · 0.45
test_node_graph_helpersFunction · 0.45
test_inputFunction · 0.45
test_stackFunction · 0.45
test_vector_to_arrayFunction · 0.45
test_reshapeFunction · 0.45
test_duplicationFunction · 0.45

Calls 5

cloneMethod · 0.80
set_node_nameMethod · 0.45
get_contextMethod · 0.45
get_graphMethod · 0.45
set_graph_nameMethod · 0.45

Tested by 15

test_instantiation_passFunction · 0.36
test_node_graph_helpersFunction · 0.36
test_inputFunction · 0.36
test_stackFunction · 0.36
test_vector_to_arrayFunction · 0.36
test_reshapeFunction · 0.36
test_duplicationFunction · 0.36
test_noopFunction · 0.36
test_inline_call_simpleFunction · 0.36
test_inline_iterateFunction · 0.36