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

Method from_a_b

ciphercore-base/src/ops/comparisons.rs:118–124  ·  view source on GitHub ↗
(a: Node, b: Node)

Source from the content-addressed store, hash-verified

116
117impl ComparisonResult {
118 fn from_a_b(a: Node, b: Node) -> Result<Self> {
119 let graph = a.get_graph();
120 let one = graph.ones(scalar_type(BIT))?;
121
122 let a_equal_b = a.add(b)?.add(one)?;
123 Ok(Self { a_equal_b, a })
124 }
125
126 /// `rhs` has higher priority. So if `rhs.a_is_smaller` or `rhs.b_is_smaller`
127 /// is set to 1 for a specific position, this value is used. Otherwise, values

Callers

nothing calls this directly

Calls 4

onesMethod · 0.80
scalar_typeFunction · 0.50
get_graphMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected