fix: semantics for bounded eventually
This commit is contained in:
parent
a295f21049
commit
46f0f60bc0
12 changed files with 412 additions and 534 deletions
|
|
@ -58,10 +58,8 @@ impl Trace for PyTrace {
|
|||
fn eval_bool_semantics(expr: &PyBoolExpr, trace: &PyTrace, interpolation_method: &str) -> PyResult<Py<BoolSignal>> {
|
||||
let interp = PyInterp::from_str(interpolation_method)?;
|
||||
let sig = match interp {
|
||||
PyInterp::Linear => BooleanSemantics::eval::<Linear, Linear>(&expr.0, trace).map_err(PyArgusError::from)?,
|
||||
PyInterp::Constant => {
|
||||
BooleanSemantics::eval::<Constant, Constant>(&expr.0, trace).map_err(PyArgusError::from)?
|
||||
}
|
||||
PyInterp::Linear => BooleanSemantics::eval::<Linear>(&expr.0, trace).map_err(PyArgusError::from)?,
|
||||
PyInterp::Constant => BooleanSemantics::eval::<Constant>(&expr.0, trace).map_err(PyArgusError::from)?,
|
||||
};
|
||||
Python::with_gil(|py| Py::new(py, (BoolSignal, PySignal::new(sig, interp))))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ macro_rules! impl_signals {
|
|||
// if it is an empty signal, make it sampled. Otherwise, throw an error.
|
||||
let signal: &mut Signal<$ty> = match signal {
|
||||
Signal::Empty => {
|
||||
super_.signal = Signal::<$ty>::new_with_capacity(1).into();
|
||||
super_.signal = Signal::<$ty>::with_capacity(1).into();
|
||||
(&mut super_.signal).try_into().unwrap()
|
||||
}
|
||||
_ => signal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue