MCPcopy Index your code
hub / github.com/ciphermodelabs/ciphercore / add

Method add

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

Adds a node to the parent graph that adds elementwise the array or scalar associated with the node to an array or scalar of the same scalar type associated with another node. Applies [Graph::add] to the parent graph, `this` node and the `b` node. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{BIT, scalar_type}; let c = create_context().unwrap();

(&self, b: Node)

Source from the content-addressed store, hash-verified

569 /// let n3 = n1.add(n2).unwrap();
570 /// ```
571 pub fn add(&self, b: Node) -> Result<Node> {
572 self.get_graph().add(self.clone(), b)
573 }
574
575 /// Adds a node to the parent graph that subtracts elementwise the array or scalar of the same scalar type associated with another node from an array or scalar associated with the node.
576 ///

Callers 15

test_get_secret_sharesFunction · 0.45
test_addFunction · 0.45
instantiateMethod · 0.45
test_instantiation_passFunction · 0.45
test_wellformed_casesFunction · 0.45
call_iterate_testFunction · 0.45
test_malformed_graphsFunction · 0.45
test_graph_consistencyFunction · 0.45
context_generatorsFunction · 0.45
test_named_contextsFunction · 0.45

Calls 3

cloneMethod · 0.80
add_nodeMethod · 0.80
get_graphMethod · 0.45

Tested by 15

test_get_secret_sharesFunction · 0.36
test_addFunction · 0.36
test_instantiation_passFunction · 0.36
test_wellformed_casesFunction · 0.36
call_iterate_testFunction · 0.36
test_malformed_graphsFunction · 0.36
test_graph_consistencyFunction · 0.36
test_named_contextsFunction · 0.36
test_resharingFunction · 0.36