mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix (JIRA)" <j...@apache.org>
Subject [jira] Created: (MAHOUT-223) Infinite loop in Vector.haveSharedCells(Vector)
Date Tue, 15 Dec 2009 04:59:18 GMT
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.


Mime
View raw message