Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
djmaxus committed Dec 26, 2024
1 parent 974c8a4 commit 7ca0165
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/fluid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ impl<V: Value, G> Grad<V> for G where
{
}

// FIXME: reduce trait bounds following the API best practices
// FIXME: reduce trait bounds following Rust API Guidelines
// TODO: implement construction of independent variables here
// TODO: core::ops::Index(Mut) ? implement/require Iterator?
// TODO: implement `eval/map` methods (for IntoVariable output structs asl well) to sequentially evaluate functions on dual number(s)
/* NOTE: foreign traits can be implemented for solid structs only.
That's why we have separate `*_impl()` functions and trait bounds
*/
/// Fundamental behavior of dual numbers
///
/// NOTE: foreign traits (such as `core::ops::*`) can be implemented for solid structs only.
/// That's why we have separate `*_impl()` functions and trait bounds
pub trait Dual
where
Self: Sized
+ Clone
+ PartialEq
Self: Sized // FIXME: remove this bound, not fundamental property
+ Clone // FIXME: remove this bound, not fundamental property
+ Add<Output = Self>
+ Mul<Output = Self>
+ Sub<Output = Self>
Expand Down

0 comments on commit 7ca0165

Please sign in to comment.