mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: NamedVector Run Amok?
Date Tue, 27 Apr 2010 22:04:15 GMT
It should only have been used in places where the Vector needed a name
-- where getName() or setName() was called. That was the intent at
least.

This code snippet looks familiar; aren't the members of this
collection used as NamedVector later?

Well to be sure you can change any occurrences back to Vector if they
don't need to be NamedVector. Try it and see if you don't get a
compile error. If you don't I made a mistake and you can surely just
fix it, or point me at it so I can fix it.

On Tue, Apr 27, 2010 at 10:54 PM, Jeff Eastman
<jdog@windwardsolutions.com> wrote:
> Hi Sean,
>
> I was under the impression that the recently refactored NamedVectors would
> be just another kind of Vector and that they would not need to show up in
> method signatures unless there really was a requirement for that explicit
> type. What I see now in many places in the clustering code is stuff like:
>
>  public static List<List<SoftCluster>> clusterPoints(List<NamedVector>
> points, ...)
>
> and,
>
>    List<NamedVector> points = new ArrayList<NamedVector>();
>    for (VectorWritable sample : sampleData) {
>      points.add((NamedVector) sample.get());
>    }
>
> in places where there should not be such a requirement. You think it correct
> to do it this way or is this the result of change-all run amok?
>
> Jeff
>

Mime
View raw message