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

Method custom_op

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

Adds a node computing a given custom operation. Custom operations can be created by the user as public structs implementing the [CustomOperationBody](../custom_ops/trait.CustomOperationBody.html). # Arguments `op` - custom operation `arguments` - vector of nodes used as input for the custom operation # Returns New custom operation node # Example ``` # use ciphercore_base::graphs::create_con

(&self, op: CustomOperation, arguments: Vec<Node>)

Source from the content-addressed store, hash-verified

3282 /// let n2 = g.custom_op(CustomOperation::new(Not {}), vec![n1]).unwrap();
3283 /// ```
3284 pub fn custom_op(&self, op: CustomOperation, arguments: Vec<Node>) -> Result<Node> {
3285 self.add_node(arguments, vec![], Operation::Custom(op))
3286 }
3287
3288 /// Adds a node which logs its input at runtime, and returns the input.
3289 /// This is intended to be used for debugging.

Callers 15

instantiateMethod · 0.45
test_notFunction · 0.45
test_orFunction · 0.45
test_instantiation_passFunction · 0.45
test_mux_bitsFunction · 0.45
test_mux_broadcastFunction · 0.45
instantiateMethod · 0.45
test_well_behavedFunction · 0.45
not_aMethod · 0.45
not_equalMethod · 0.45
greater_than_equal_toMethod · 0.45
less_than_equal_toMethod · 0.45

Calls 1

add_nodeMethod · 0.80