You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Jake Mannix (JIRA)" <ji...@apache.org> on 2009/11/24 18:06:41 UTC

[jira] Updated: (MAHOUT-206) Separate and clearly label different SparseVector implementations

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

Jake Mannix updated MAHOUT-206:
-------------------------------

    Attachment: MAHOUT-206.patch

Patch renames the hash-based SparseVector with RandomAccessSparseVector, and adds back the old form of SparseVector (backed by OrderedIntDoubleMapping) named now as SequentialAccessSparseVector.  

Unit tests added testing both forms of sparse vector.

BUT, I have not gone through all the places where we use SparseVector instances and deliberately picked SequetialAccess or RandomAccess choices for the sparse impl.  All usage is done as RandomAccessSparseVector (ie. by the refactor-rename on trunk of SparseVector to RandomAccessSparseVector), and we will need to intentionally swap in SequentialAccessSparseVector in the primarily immutable/read-only case.

> Separate and clearly label different SparseVector implementations
> -----------------------------------------------------------------
>
>                 Key: MAHOUT-206
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-206
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.2
>         Environment: all
>            Reporter: Jake Mannix
>             Fix For: 0.3
>
>         Attachments: MAHOUT-206.patch
>
>
> Shashi's last patch on MAHOUT-165 swapped out the int/double parallel array impl of SparseVector for an OpenIntDoubleMap (hash-based) one.  We actually need both, as I think I've mentioned a gazillion times.
> There was a patch, long ago, on MAHOUT-165, in which Ted had OrderedIntDoubleVector, and OpenIntDoubleHashVector (or something to that effect), and neither of them are called SparseVector.  I like this, because it forces people to choose what kind of SparseVector they want (and they should: sparse is an optimization, and the client should make a conscious decision what they're optimizing for).  
> We could call them RandomAccessSparseVector and SequentialAccessSparseVector, to be really obvious.
> But really, the important part is we have both.

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