add_rrule

Function add_rrule 

Source
pub fn add_rrule<S: ScalarAd>(cotangent: S) -> (S, S)
Expand description

Reverse rule for add.

Returns cotangents with respect to (x, y).

ยงExamples

use chainrules::add_rrule;

let (dx, dy) = add_rrule(1.25_f64);
assert_eq!(dx, 1.25_f64);
assert_eq!(dy, 1.25_f64);