[ 
https://issues.apache.org/jira/browse/MAHOUT-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12790564#action_12790564
 ] 

Sean Owen commented on MAHOUT-223:
----------------------------------

I don't see that this method is used, and I also wonder about the purpose. It 
seems a little undesirable as a public API method as it seems to strictly 
concern implementation. I'd vote for simply removing it unless someone can talk 
about the future use for it.

> Infinite loop in Vector.haveSharedCells(Vector)
> -----------------------------------------------
>
>                 Key: MAHOUT-223
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-223
>             Project: Mahout
>          Issue Type: Bug
>          Components: Matrix
>    Affects Versions: 0.2
>            Reporter: Jake Mannix
>             Fix For: 0.3
>
>
> SparseVector:
> {code}
>   @Override
>   public boolean haveSharedCells(Vector other) {
>     if (other instanceof SparseVector) {
>       return other == this;
>     } else {
>       return other.haveSharedCells(this);
>     }
>   }
> {code}
> DenseVector:
> {code}
>   @Override
>   public boolean haveSharedCells(Vector other) {
>     if (other instanceof DenseVector) {
>       return other == this;
>     } else {
>       return other.haveSharedCells(this);
>     }
>   }
> {code}
> I think the result is self-explanatory.
> I'd just check a fix in, but I don't have an svn account yet.  Actually, no I 
> wouldn't because I'm not exactly sure what this method is supposed to do - 
> it's clearly for VectorView instances somehow... but what about Sparse and 
> Dense versions on the same vector (same meaning strictEquivalent() returns 
> true for them)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to