Structure

# DifferentiableView

The view of an array as the differentiable product manifold of `Element` multiplied with itself `count` times.

• Available when `Element` conforms to `Differentiable`

``@frozen struct DifferentiableView``

## Members

### Typealiases

• `typealias TangentVector`

A type representing a differentiable value’s derivatives.

### Initializers

• `init([Element])`

Creates a differentiable view of the given array.

• `init(arrayLiteral: Element...)`

Creates an instance initialized with the given elements.

### Instance Subscripts

• `subscript(Int) -> Element`

### Type Properties

• `static var zero: Array<Element>.DifferentiableView`

The zero value.

### Instance Properties

• `var base: [Element]`

The viewed array.

• `var customMirror: Mirror`

The custom mirror for this instance.

• `var description: String`

A textual representation of this instance.

### Instance Methods

• `func move(by: Array<Element>.DifferentiableView.TangentVector)`

Moves `self` by the given offset. In Riemannian geometry, this is equivalent to exponential map, which moves `self` on the geodesic surface by the given tangent vector.

• `func move(by: Self.TangentVector)`

Moves `self` by the given offset. In Riemannian geometry, this is equivalent to exponential map, which moves `self` on the geodesic surface by the given tangent vector.

### Operators

• `static func + (Self) -> Self`

Returns the given number unchanged.

• `static func += (inout Self, Self)`

Adds two values and stores the result in the left-hand-side variable.

• `static func -= (inout Self, Self)`

Subtracts the second value from the first and stores the difference in the left-hand-side variable.

• `static func + (Array<Element>.DifferentiableView, Array<Element>.DifferentiableView) -> Array<Element>.DifferentiableView`

Adds two values and produces their sum.

• `static func - (Array<Element>.DifferentiableView, Array<Element>.DifferentiableView) -> Array<Element>.DifferentiableView`

Subtracts one value from another and produces their difference.

• `static func == (Array<Element>.DifferentiableView, Array<Element>.DifferentiableView) -> Bool`

Returns a Boolean value indicating whether two values are equal.

• `static func != (Self, Self) -> Bool`

## Conforms To

• `AdditiveArithmetic`

When `Element` conforms to `AdditiveArithmetic` and `Element` conforms to `Differentiable`

• `CustomReflectable`

When `Element` conforms to `Differentiable`

• `CustomStringConvertible`

When `Element` conforms to `Differentiable`

• `Differentiable`

When `Element` conforms to `Differentiable`

• `Equatable`

When `Element` conforms to `Equatable` and `Element` conforms to `Differentiable`

• `ExpressibleByArrayLiteral`

When `Element` conforms to `Differentiable`