rsdiff-core 0.0.2

This is the core library for the Acme project. It contains the core primitives that are used throughout the project.
Documentation
/*
   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,
        }
    }
}