rsdiff_core/ops/kinds/unary/
operator.rs

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