Function scalar

Source
pub fn scalar<F: Field>(name: &str) -> Amplitude<F>
Expand description

Creates a named Scalar.

This is a convenience method to generate an Amplitude which is just a single free parameter called value.

ยงExamples

Basic usage:

use rustitude_core::prelude::*;
let my_scalar: Amplitude<f64> = scalar("MyScalar");
assert_eq!(my_scalar.parameters, vec!["value".to_string()]);