zhipeng93 commented on a change in pull request #73:
URL: https://github.com/apache/flink-ml/pull/73#discussion_r834124527
##########
File path:
flink-ml-core/src/main/java/org/apache/flink/ml/linalg/DenseVector.java
##########
@@ -68,4 +68,9 @@ public boolean equals(Object obj) {
public int hashCode() {
return Arrays.hashCode(values);
}
+
+ @Override
+ public Vector clone() {
Review comment:
Thanks for pointing this out. The `clone()` here is to create a new
instance of this Vector for further in-place operations, in which case we may
not want to update the vectors directly.
I think there could be two alternatives:
- How about we rename the method to `duplicate` or something like `copy`?
- Or how about we remove the `clone()` in `Vector`, but keep it in
`SparseVector` and `DenseVector`, given that we are indeed cloning vectors.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]