Ignore:
Timestamp:
Oct 30, 2010, 8:39:22 PM (14 years ago)
Author:
toshi
Message:
 
Location:
branches/localSpectral/src/clustering
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/localSpectral/src/clustering/Edge.java

    r33 r34  
    2727    }
    2828
    29    
     29    @Override
     30    public String toString(){
     31        return vertex1 + " --> "+ vertex2;
     32    }
    3033   
    3134
  • branches/localSpectral/src/clustering/LocalSpectral.java

    r32 r34  
    9292        double min_conductance_subset=100;
    9393        int min_conductance_index = -1;
     94        int volume_cluster=0;
    9495
    9596        int subsets_count = vertexsScore.size();
     
    114115                    minvolume = volume_graph - volume_subset;
    115116                double conductance = edge_boundary / minvolume;
     117
    116118                if ((volume_subset > min_volume) && (volume_subset < max_volume)){
     119                //if (volume_subset < min_volume){
    117120                    if (conductance < min_conductance_subset){
    118121                        min_conductance_subset = conductance;
    119122                        min_conductance_index = i;
     123                        volume_cluster = volume_subset;
    120124                    }
    121125                }
    122                 //System.out.println("CONDUCTANCE: "+conductance + " minvolume: "+minvolume + " edge_boundary: "+edge_boundary);
    123126            }
    124127
     
    126129        System.out.println("MIN CONDUCTANCE: "+min_conductance_subset);
    127130
    128         System.out.println("CLUSTER: ");
     131        System.out.println("CLUSTER: ("+min_conductance_index+" elements, volume "+ volume_cluster +", volume graph "+ 2 * this.graph.getEdgeCount()+")");
    129132        List<V> cluster = new ArrayList<V>();
    130133        for(int i=0; i< min_conductance_index; i++)
    131134            cluster.add(vertexsScore.get(i).getVertex());
    132135
     136        String node_list = "";
    133137        for(V node : cluster)
    134             System.out.println(node.toString());
     138            node_list += node.toString() + ",";
     139        System.out.println(node_list);
    135140       
    136141        return cluster;
Note: See TracChangeset for help on using the changeset viewer.