Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed May 8, 2012
1 parent 1a5afeb commit 3253633
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cluster.java
Expand Up @@ -172,7 +172,7 @@ private void initCluster() {
while (it.hasNext()) {
Vertex v = this.s.v.get(it.next());
if (v.type == Vertex.CONFERENCE) {
int clusterNum = cn++/k;
int clusterNum = cn++%k;
v.cluster = clusterNum;
this.c.get(clusterNum).l.add(v.id);
}
Expand Down
5 changes: 5 additions & 0 deletions src/RankClus.java
Expand Up @@ -38,6 +38,11 @@ public static void main(String[] args) {
s.build();
System.out.println("Building data structure finished!");

if (k>s.c) {
System.out.println("\nERROR: Number of clusters cannot exceed target objects\n");
System.exit(1);
}

c = new Cluster(k, s, a);
System.out.println("Initialized clustering!");

Expand Down

0 comments on commit 3253633

Please sign in to comment.