You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2009/12/22 14:50:29 UTC

[jira] Resolved: (MAHOUT-223) Infinite loop in Vector.haveSharedCells(Vector)

     [ https://issues.apache.org/jira/browse/MAHOUT-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved MAHOUT-223.
------------------------------

    Resolution: Fixed
      Assignee: Sean Owen

> 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
>            Assignee: Sean Owen
>             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.