public class Cluster<X extends Jcg.geometry.Point_d>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.HashMap<X,java.lang.Integer> |
clusters |
| Constructor and Description |
|---|
Cluster() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToCluster(X p,
int i)
Assign a point to a given cluster
|
int |
getClusterIndex(X p)
Get the index of the cluster containing a given point
|
private java.util.HashMap<X extends Jcg.geometry.Point_d,java.lang.Integer> clusters
public void addToCluster(X p, int i)
p - the point to add to a clusteri - the index of the clusterpublic int getClusterIndex(X p)
p - the point