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

Method zeros

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

Adds an node with zeros of given type. Compared to `constant` this node does produce a big value array in serialized graph. # Arguments `t` - node type # Returns New node with zeros of given type. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{UINT8, array_type}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let z = g

(&self, t: Type)

Source from the content-addressed store, hash-verified

1582 /// let z = g.zeros(array_type(vec![10, 20], UINT8)).unwrap();
1583 /// ```
1584 pub fn zeros(&self, t: Type) -> Result<Node> {
1585 self.add_node(vec![], vec![], Operation::Zeros(t))
1586 }
1587
1588 /// Adds an node with ones of given type.
1589 ///

Callers 15

zeros_likeFunction · 0.80
extend_with_zerosFunction · 0.80
cumulative_orFunction · 0.80
instantiateMethod · 0.80
broadcastFunction · 0.80
absFunction · 0.80
instantiateMethod · 0.80
instantiateMethod · 0.80
calculate_carry_bitsFunction · 0.80
i64_to_i128Function · 0.80
instantiateMethod · 0.80
zero_pad_columnFunction · 0.80

Calls 1

add_nodeMethod · 0.80

Tested by 2

test_zerosFunction · 0.64
test_zerosFunction · 0.64