VectorList is a rather odd beast. it's a cool idea. It increases in #
of rows dynamically, unlike all other Matrix classes (which was coded
wrong and inspired this patch). It can fail on given accesses,
throwing a null pointer if you have not supplied a vector for a row.

And, if you say "like(4,3)" it cannot make a vector matching your
existing vector type with "like(3)", because Vector only has 'like()'
and no 'like(int length)'.

I was not using it for sparseness. In fact, looking back, I was
misusing it. Perhaps it should not exist?

On Mon, Jul 11, 2011 at 9:34 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:
> I haven't been able to track all of this, but I think things are going in an
> odd direction.
>
> - DenseVector is not a reasonable default for something that appears to be
> intended to support various flavors of sparse matrices.
>
> - null rows are not a problem.  Interpret them as all zero
>
> - setting the number of rows and columns does not imply allocation.  Neither
> does a legal access.  The only thing that implies allocation is setting a
> value to non-zero.
>
> On Mon, Jul 11, 2011 at 9:06 PM, Lance Norskog (JIRA) <j...@apache.org>wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/MAHOUT-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063705#comment-13063705]
>>
>> Lance Norskog commented on MAHOUT-756:
>> --------------------------------------
>>
>> When it is this confusing, UnsupportedOperationException is permissible.
>> There is no obvious right thing to do. What if there are different Vector
>> classes and some empty slots?
>>
>> Using DenseVector/Matrix is the default policy in other places, so let's go
>> with that. If your program runs out of memory, you'll eventually find all of
>> the DenseVectors and track down the problem. In the meantime, it will be
>> slow but will work.
>>
>> > VectorList (Matrix implementation) does not maintain cardinality getters
>> correctly
>> >
>> ----------------------------------------------------------------------------------
>> >
>> >                 Key: MAHOUT-756
>> >                 URL: https://issues.apache.org/jira/browse/MAHOUT-756
>> >             Project: Mahout
>> >          Issue Type: Bug
>> >          Components: Math
>> >            Reporter: Lance Norskog
>> >            Priority: Minor
>> >         Attachments: VectorList.patch
>> >
>> >
>> > VectorList (implements Matrix) is dynamically expandable, row-wise. There
>> are three different ways to query the size of a Matrix, and VectorList does
>> not correctly supply these values.
>> >
>>
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>



-- 
Lance Norskog
goks...@gmail.com

Reply via email to