xad-rs 0.3.6

Exact automatic differentiation for Rust — forward-mode, reverse-mode, first- and second-order, with named variable support for ergonomic gradient readback
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Type traits and marker types for the AD system.

use num_traits::{Float, FromPrimitive, NumAssign};
use std::fmt::{Debug, Display};

/// Trait bound for scalar types usable in the AD system.
pub trait Scalar:
    Float + NumAssign + FromPrimitive + Debug + Display + Default + Send + Sync + 'static
{
}

impl Scalar for f32 {}
impl Scalar for f64 {}