/** * Creates an instance of a VoltageCluster with the specified parameters. These are mostly * parameters that are passed directly to VoltageScorer and KMeansClusterer. * * @param g the graph whose nodes are to be clustered * @param num_candidates the number of candidate clusters to create */ public VoltageClusterer(Network<N, E> g, int num_candidates) { Preconditions.checkArgument(num_candidates >= 1, "must generate >= 1 candidates"); this.num_candidates = num_candidates; this.kmc = new KMeansClusterer<N>(); rand = new Random(); this.g = g; }
/** * Creates an instance of a VoltageCluster with the specified parameters. * These are mostly parameters that are passed directly to VoltageScorer * and KMeansClusterer. * * @param g the graph whose vertices are to be clustered * @param num_candidates the number of candidate clusters to create */ public VoltageClusterer(Graph<V,E> g, int num_candidates) { if (num_candidates < 1) throw new IllegalArgumentException("must generate >=1 candidates"); this.num_candidates = num_candidates; this.kmc = new KMeansClusterer<V>(); rand = new Random(); this.g = g; }
/** * Creates an instance of a VoltageCluster with the specified parameters. * These are mostly parameters that are passed directly to VoltageScorer and * KMeansClusterer. * * @param num_candidates * the number of candidate clusters to create */ public VoltageClusterer(Graph<V, E> g, int num_candidates) { if (num_candidates < 1) { throw new IllegalArgumentException("must generate >=1 candidates"); } this.num_candidates = num_candidates; this.kmc = new KMeansClusterer<V>(); rand = new Random(); this.g = g; }
/** * Creates an instance of a VoltageCluster with the specified parameters. * These are mostly parameters that are passed directly to VoltageScorer * and KMeansClusterer. * * @param num_candidates the number of candidate clusters to create */ public VoltageClusterer(Graph<V,E> g, int num_candidates) { if (num_candidates < 1) throw new IllegalArgumentException("must generate >=1 candidates"); this.num_candidates = num_candidates; this.kmc = new KMeansClusterer<V>(); rand = new Random(); this.g = g; }