# AnyDerivative

Stay organized with collections Save and categorize content based on your preferences.
``````@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)``
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]