acme_core/ops/traits/evaluate.rs
1/*
2 Appellation: evaluate <traits>
3 Contrib: FL03 <jo3mccain@icloud.com>
4*/
5use crate::ops::{Operator, Params};
6
7pub trait Evaluate<Args>
8where
9 Self: Operator,
10 Args: Params,
11{
12 type Output;
13
14 fn eval(&self, args: Args) -> Self::Output;
15}
16
17pub trait Differentiable<Args>
18where
19 Self: Evaluate<Args>,
20 Args: Params,
21{
22 type Grad;
23
24 fn grad(&self, args: Args) -> Self::Grad;
25}