On 07/26/2013 09:54 PM, arvind viswanathan wrote:
> I am trying to use the class for clustering. However I am not sure about
> the syntax of using this function.
> Here is what I have,
> List<DoublePoint> data = new ArrayList<DoublePoint>();
> DBSCANClusterer<? extends Clusterable> dbscan = new
> DBSCANClusterer<DoublePoint>(10,3);
> List <Cluster<DoublePoint>> clusters = dbscan.cluster(data );
>
> Above line gives an error,
> The method cluster(Collection<capture#1-of ? extends Clusterable>) in the
> type DBSCANClusterer<capture#1-of ? extends
> Clusterable> is not applicable for the arguments (List<DoublePoint>)
>
>
> Not sure what I am doing wrong.
Hi Arvind,
I assume you use the refactored classes in the o.a.c.m.ml.clustering
package.
You can use the Clusterer like that:
List<DoublePoint> data = new ArrayList<DoublePoint>();
DBSCANClusterer<DoublePoint> dbscan =
new DBSCANClusterer<DoublePoint>(10,3);
List <Cluster<DoublePoint>> clusters = dbscan.cluster(data);
To use the generic interface Clusterable, the Clusterer interface should
better be like that:
public List<Cluster<T>> cluster(final Collection<? extends T> points)
We will consider this for the next version.
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]