# AnyDerivative

``````@frozen
public struct AnyDerivative : Differentiable & AdditiveArithmetic``````

A type-erased derivative value.

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.

• ``` base ```

The underlying base value.

#### Declaration

``public var base: Any { get }``
• ``` init(_:) ```

Creates a type-erased derivative from the given derivative.

#### Declaration

``````@differentiable
public init<T>(_ base: T) where T : Differentiable, T == T.TangentVector``````
• ``` TangentVector ```

#### Declaration

``public typealias TangentVector = AnyDerivative``
• ``` ==(_:_:) ```

#### Declaration

``public static func == (lhs: AnyDerivative, rhs: AnyDerivative) -> Bool``
• ``` !=(_:_:) ```

#### Declaration

``public static func != (lhs: AnyDerivative, rhs: AnyDerivative) -> Bool``
• ``` zero ```

#### Declaration

``public static var zero: AnyDerivative { get }``
• ``` +(_:_:) ```

#### Declaration

``````public static func + (
lhs: AnyDerivative, rhs: AnyDerivative
) -> AnyDerivative``````
• ``` -(_:_:) ```

#### Declaration

``````public static func - (
lhs: AnyDerivative, rhs: AnyDerivative
) -> AnyDerivative``````
• ``` move(along:) ```

#### Declaration

``public mutating mutating func move(along direction: TangentVector)``