Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-223

Infinite loop in Vector.haveSharedCells(Vector)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2
    • 0.3
    • classic
    • None

    Description

      SparseVector:

        @Override
        public boolean haveSharedCells(Vector other) {
          if (other instanceof SparseVector) {
            return other == this;
          } else {
            return other.haveSharedCells(this);
          }
        }
      

      DenseVector:

        @Override
        public boolean haveSharedCells(Vector other) {
          if (other instanceof DenseVector) {
            return other == this;
          } else {
            return other.haveSharedCells(this);
          }
        }
      

      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)?

      Attachments

        Activity

          People

            srowen Sean R. Owen
            jake.mannix Jake Mannix
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: