Enum libreda_sta::liberty_util::Interp
source · pub enum Interp<Z = f64, X = f64, Y = X> {
Scalar(Z),
Interp1D1(Interp1D<X, Z>),
Interp1D2(Interp1D<Y, Z>),
Interp2D(Interp2D<X, Y, Z, OwnedRepr<Z>>),
}Expand description
Interpolated timing table with two, one or zero variables.
Variants§
Scalar(Z)
A scalar (constant) value.
Interp1D1(Interp1D<X, Z>)
A one-dimensional table. Value depends only on the first variable.
Interp1D2(Interp1D<Y, Z>)
A one-dimensional table. Value depends only on the second variable.
Interp2D(Interp2D<X, Y, Z, OwnedRepr<Z>>)
A two-dimensional table
Implementations§
source§impl<Z, X, Y> Interp<Z, X, Y>
impl<Z, X, Y> Interp<Z, X, Y>
sourcepub fn eval2d(&self, (x, y): (X, Y)) -> Zwhere
X: Copy + Sub<Output = X> + Div + PartialOrd,
Y: Copy + Sub<Output = Y> + Div<Output = <X as Div>::Output> + PartialOrd,
Z: Copy + Mul<<X as Div>::Output, Output = Z> + Add<Output = Z> + Sub<Output = Z>,
<X as Div>::Output: Copy + Add<Output = <X as Div>::Output> + Sub<Output = <X as Div>::Output>,
pub fn eval2d(&self, (x, y): (X, Y)) -> Zwhere X: Copy + Sub<Output = X> + Div + PartialOrd, Y: Copy + Sub<Output = Y> + Div<Output = <X as Div>::Output> + PartialOrd, Z: Copy + Mul<<X as Div>::Output, Output = Z> + Add<Output = Z> + Sub<Output = Z>, <X as Div>::Output: Copy + Add<Output = <X as Div>::Output> + Sub<Output = <X as Div>::Output>,
Evaluate the interpolated function at (x, y).
For 1D functions y is ignored.
For scalars both x and y is ignored.
sourcepub fn swap_variables(self) -> Interp<Z, Y, X>where
Z: Clone,
pub fn swap_variables(self) -> Interp<Z, Y, X>where Z: Clone,
Swap the variables