Structure_Differentiation5.9.0
AnyDerivative
A type-erased derivative value.
@frozen struct AnyDerivative
The AnyDerivative
type forwards its operations to an arbitrary underlying base derivative value conforming to Differentiable
and AdditiveArithmetic
, hiding the specifics of the underlying value.
Citizens in _Differentiation
Conformances
protocol AdditiveArithmetic
A type with values that support addition and subtraction.
protocol CustomReflectable
A type that explicitly supplies its own mirror.
protocol Differentiable
A type that mathematically represents a differentiable manifold whose tangent spaces are finite-dimensional.
protocol Equatable
A type that can be compared for value equality.
Members
init<T>(T
) Creates a type-erased derivative from the given derivative.
static var zero: AnyDerivative
var base: Any
The underlying base value.
var customMirror: Mirror
static func != (AnyDerivative, AnyDerivative
) -> Bool static func + (AnyDerivative, AnyDerivative
) -> AnyDerivative static func - (AnyDerivative, AnyDerivative
) -> AnyDerivative static func == (AnyDerivative, AnyDerivative
) -> Bool func move(by: AnyDerivative.TangentVector
) typealias TangentVector
Features
static func != (Self, Self
) -> Bool static func + (Self
) -> Self Returns the given number unchanged.