pub enum TapeOp {
Show 16 variants
Const(f64),
Var(usize),
Add(usize, usize),
Sub(usize, usize),
Mul(usize, usize),
Div(usize, usize),
Pow(usize, usize),
Neg(usize),
Abs(usize),
Sqrt(usize),
Exp(usize),
Log(usize),
Log10(usize),
Sin(usize),
Cos(usize),
Funcall {
lib: Arc<ExternalLibrary>,
name: String,
args: Vec<TapeFuncallArg>,
},
}Expand description
One operation in the flattened tape. Operand fields are tape-slot
indices into the same tape; Var(i) references problem variable
index i (read from the input x slice during forward).
Variants§
Const(f64)
Var(usize)
Add(usize, usize)
Sub(usize, usize)
Mul(usize, usize)
Div(usize, usize)
Pow(usize, usize)
Neg(usize)
Abs(usize)
Sqrt(usize)
Exp(usize)
Log(usize)
Log10(usize)
Sin(usize)
Cos(usize)
Funcall
AMPL imported (external) function call. The library is kept alive by
the Arc; name is the registered function name; args carries
positional arguments where real-valued args reference earlier tape
slots and string args are inline literals.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TapeOp
impl RefUnwindSafe for TapeOp
impl Send for TapeOp
impl Sync for TapeOp
impl Unpin for TapeOp
impl UnsafeUnpin for TapeOp
impl UnwindSafe for TapeOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more