Changeset 34 for branches/localSpectral/src/clustering
- Timestamp:
- Oct 30, 2010, 8:39:22 PM (14 years ago)
- Location:
- branches/localSpectral/src/clustering
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/localSpectral/src/clustering/Edge.java
r33 r34 27 27 } 28 28 29 29 @Override 30 public String toString(){ 31 return vertex1 + " --> "+ vertex2; 32 } 30 33 31 34 -
branches/localSpectral/src/clustering/LocalSpectral.java
r32 r34 92 92 double min_conductance_subset=100; 93 93 int min_conductance_index = -1; 94 int volume_cluster=0; 94 95 95 96 int subsets_count = vertexsScore.size(); … … 114 115 minvolume = volume_graph - volume_subset; 115 116 double conductance = edge_boundary / minvolume; 117 116 118 if ((volume_subset > min_volume) && (volume_subset < max_volume)){ 119 //if (volume_subset < min_volume){ 117 120 if (conductance < min_conductance_subset){ 118 121 min_conductance_subset = conductance; 119 122 min_conductance_index = i; 123 volume_cluster = volume_subset; 120 124 } 121 125 } 122 //System.out.println("CONDUCTANCE: "+conductance + " minvolume: "+minvolume + " edge_boundary: "+edge_boundary);123 126 } 124 127 … … 126 129 System.out.println("MIN CONDUCTANCE: "+min_conductance_subset); 127 130 128 System.out.println("CLUSTER: ");131 System.out.println("CLUSTER: ("+min_conductance_index+" elements, volume "+ volume_cluster +", volume graph "+ 2 * this.graph.getEdgeCount()+")"); 129 132 List<V> cluster = new ArrayList<V>(); 130 133 for(int i=0; i< min_conductance_index; i++) 131 134 cluster.add(vertexsScore.get(i).getVertex()); 132 135 136 String node_list = ""; 133 137 for(V node : cluster) 134 System.out.println(node.toString()); 138 node_list += node.toString() + ","; 139 System.out.println(node_list); 135 140 136 141 return cluster;
Note: See TracChangeset
for help on using the changeset viewer.