mirror of
https://github.com/apple/swift-numerics
synced 2026-11-24 04:38:11 +00:00
Define Complex.zeroTangentVectorInitializer.
The `Differentiable.zeroTangentVectorInitializer` protocol requirement is a closure producing a zero tangent vector, capturing minimal information from `self`. Fixes the `Complex: Differentiable` conformance for master toolchains.
This commit is contained in:
1 parent
593946d4aa
commit
86f0b33c65
2 files changed
+9
No files matched your search
@@ -15,6 +15,11 @@ import _Differentiation
|
||||
extension Complex: Differentiable
|
||||
where RealType: Differentiable, RealType.TangentVector == RealType {
|
||||
public typealias TangentVector = Self
|
||||
|
||||
@inlinable
|
||||
public var zeroTangentVectorInitializer: () -> Self {
|
||||
{ Complex.zero }
|
||||
}
|
||||
}
|
||||
|
||||
extension Complex
|
||||
|
||||
Reference in new issue
Block a user