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

Function constant_scalar

ciphercore-base/src/ops/utils.rs:143–149  ·  view source on GitHub ↗
(
    g: &Graph,
    value: T,
    st: ScalarType,
)

Source from the content-addressed store, hash-verified

141}
142
143pub fn constant_scalar<T: TryInto<u128> + Not<Output = T> + TryInto<u8> + Copy>(
144 g: &Graph,
145 value: T,
146 st: ScalarType,
147) -> Result<Node> {
148 constant(g, TypedValue::from_scalar(value, st)?)
149}
150
151pub fn multiply_fixed_point(node1: Node, node2: Node, precision: u64) -> Result<Node> {
152 node1.multiply(node2)?.truncate(1 << precision)

Callers 15

onehotFunction · 0.85
instantiateMethod · 0.85
scalar_helperFunction · 0.85
instantiateMethod · 0.85
scalar_division_helperFunction · 0.85
instantiateMethod · 0.85
compute_naive_aucFunction · 0.85
instantiateMethod · 0.85
scalar_division_helperFunction · 0.85
instantiateMethod · 0.85
build_test_dataFunction · 0.85

Calls 1

constantFunction · 0.85

Tested by 1

build_test_dataFunction · 0.68