1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* Appellation: operator <mod> Contrib: FL03 <jo3mccain@icloud.com> */ use super::UnaryOp; pub struct UnaryOperator<A> { pub args: A, pub differentiable: bool, pub op: UnaryOp, } impl<A> UnaryOperator<A> { pub fn new(args: A, op: UnaryOp) -> Self { Self { args, differentiable: op.differentiable(), op, } } }