-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor tweaks to Differentiable
protocol.
#21521
Minor tweaks to Differentiable
protocol.
#21521
Conversation
@swift-ci Please test tensorflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -60,23 +60,25 @@ public extension VectorNumeric { | |||
public protocol Differentiable { | |||
/// The tangent vector space of this differentiable manifold. | |||
associatedtype TangentVector : Differentiable | |||
where TangentVector.TangentVector == TangentVector | |||
where TangentVector.TangentVector == TangentVector, | |||
TangentVector.Scalar : FloatingPoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the build error: I think you need to specify TangentVector
's conformance to VectorNumeric
here.
db2574f
to
5b29e9b
Compare
@swift-ci Please test tensorflow |
Ah right, tests should be updated |
Updating tests soon! Since the I suppose this is fine and intentional. |
175a0b3
to
71bb3e1
Compare
- Conform `TangentVector` and `CotangentVector` to `VectorNumeric where Scalar : FloatingPoint`. - Rename `moved(toward:)` to `moved(along:)`. Also remove extraneous shape-related `VectorNumeric` requirements from `FloatingPoint` types. Those requirements are no longer necessary now that `ShapedVectorNumeric` has been split from `VectorNumeric`.
71bb3e1
to
3cb371b
Compare
@swift-ci Please test tensorflow |
TangentVector
andCotangentVector
toVectorNumeric where Scalar : FloatingPoint
.moved(toward:)
tomoved(along:)
.Also remove extraneous shape-related
VectorNumeric
requirements fromFloatingPoint
types. Those requirements are no longer necessary nowthat
ShapedVectorNumeric
has been split fromVectorNumeric
.