mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAHOUT-756) VectorList (Matrix implementation) does not maintain cardinality getters correctly
Date Mon, 11 Jul 2011 11:13:59 GMT

    [ https://issues.apache.org/jira/browse/MAHOUT-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063289#comment-13063289
] 

Sean Owen commented on MAHOUT-756:
----------------------------------

I like most of this cleanup. I think we could leave the getQuick()/setQuick() methods as-is
-- no need for additional arg checking. Their intent is to be used when the caller knows it's
OK.

I don't know that it's a problem that this allows different rows to be of different types.
I don't think any caller uses it that way anyway.

It is interesting what "like" means for the method that specifies a new number of rows --
what are the types of the new rows? Right now it forces them to DenseVector which doesn't
feel right if the other like() method does not do the same. On the other hand, you're requesting
a different number of rows, which means the type of new rows aren't defined anyway, so how
much can the caller care?

I think the least surprising thing for the caller, who will normally have an object with all
one type of vector, is to have a result of the same type of vector. So, in that sense I think
your change is good.

But there isn't a need for a new likeVector() method; call Vector.like() as the other method
does.

Let me see what happens under these changes.

> 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

        

Mime
View raw message