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

Method create_vector

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

Adds a node that creates a vector from several (possibly, zero) elements of the same type. # Arguments `elements` - vector of nodes # Returns New node with a created vector # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{INT32, array_type}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = array_type(vec![3, 2, 3],

(&self, element_type: Type, elements: Vec<Node>)

Source from the content-addressed store, hash-verified

2756 /// let n3 = g.create_vector(t, vec![n1,n2]).unwrap();
2757 /// ```
2758 pub fn create_vector(&self, element_type: Type, elements: Vec<Node>) -> Result<Node> {
2759 self.add_node(elements, vec![], Operation::CreateVector(element_type))
2760 }
2761
2762 /// Adds a node that creates a named tuple from several (possibly, zero) elements.
2763 ///

Callers 15

test_wellformed_casesFunction · 0.45
instantiateMethod · 0.45
test_vector_to_arrayFunction · 0.45
recursively_sum_sharesFunction · 0.45
test_prfFunction · 0.45
inline_iterateFunction · 0.45
test_nested_iterateFunction · 0.45

Calls 1

add_nodeMethod · 0.80

Tested by 12

test_wellformed_casesFunction · 0.36
test_vector_to_arrayFunction · 0.36
test_prfFunction · 0.36
test_nested_iterateFunction · 0.36
test_empty_state_iterateFunction · 0.36
build_test_dataFunction · 0.36
test_simple_vector_getFunction · 0.36
test_complex_treeFunction · 0.36