Trait for common mathematical functions for scalars, vectors and matrices.
| 416 | |
| 417 | /// Trait for common mathematical functions for scalars, vectors and matrices. |
| 418 | pub trait FunctionsInPlace { |
| 419 | |
| 420 | /// Computes the sigmoid function (i.e. 1/(1+exp(-x))) for a scalar or each |
| 421 | /// element in a vector or matrix. |
| 422 | fn isigmoid(&mut self); |
| 423 | |
| 424 | /// Computes the derivative of the sigmoid function (i.e. sigmoid(x) * (1 - sigmoid(x))) |
| 425 | /// for a scalar or each element in a vector or matrix. |
| 426 | fn isigmoid_derivative(&mut self); |
| 427 | |
| 428 | /// Takes the reciprocal. |
| 429 | fn irecip(&mut self); |
| 430 | } |
| 431 | |
| 432 | macro_rules! impl_functions_ops_inplace { |
| 433 | ( $( $x:ty )+ ) => ($( |
nothing calls this directly
no outgoing calls
no test coverage detected