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

Sean Owen commented on MAHOUT-1135:
-----------------------------------

Writable is all I mean. If you retain the concrete subclasses it should be OK. 
Does the added complexity of a new superclass buy much?

I don't think WeightedVector is directly related to WeightedVectorWritable as 
it is not what that class reads/writes. This part has indeed been made quite a 
mess by several independent lines of thought not cooperating. Any cleanup is 
good. You are likely to find more long-standing problems, like, look at 
equals()/hashCode().

There should be nothing wrong with implementing Cloneable in the superclass. 
Yes, it's the subclasses that individually have to know how to clone 
themselves, not the parent. T does not need to be reified since you won't 
implement this in the superclass.
                
> Unify decorated vectors in DecoratedVector<T>
> ---------------------------------------------
>
>                 Key: MAHOUT-1135
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-1135
>             Project: Mahout
>          Issue Type: Wish
>          Components: Math
>    Affects Versions: 1.0
>            Reporter: Dan Filimon
>            Priority: Minor
>              Labels: improvement, vector
>
> I'm finding the current Vector classes in Mahout a bit confusing.
> The vector implementation are just fine, I'm talking more about the decorated 
> vectors:
> WeightedVector
> MatrixSlice
> NamedVector
> I propose using a single DecoratedVector<T> type that can easily be extended.
> For example, right now MatrixSlice doesn't even implement the Vector 
> interface.
> So,
> WeightedVector -> DecoratedVector<Pair<Integer, Double>>
> MatrixSlice -> DecoratedVector<Integer>
> NamedVector -> DecoratedVector<String>
> We could even keep the names (maybe changing MatrixSlice to something like 
> IndexedVector though?) by extending DecoratedVector<T>.
> I'd be willing to fix this if people think it's a good idea.
> What about it? :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to