Skip to content

Commit

Permalink
minor fix: add params to output file names for running multiple jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ariez-xyz committed May 31, 2019
1 parent cc85a02 commit ed6c6de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tasks/MergeOverlappingCommunities.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class MergeOverlappingCommunities {
public static void main(String[] args) throws IOException, InterruptedException {
if (args.length != 4) {
System.out.println("usage: MergeOverlappingCommunities numThreads walltimeSeconds edgeOverlapThreshold nodeOverlapThreshold");
System.out.println("writing new eigenvalues will take a while.. needs +1 hour or so of extra walltime");
System.exit(1);
} else {
numThreads = Integer.parseInt(args[0]);
Expand All @@ -49,15 +48,15 @@ public static void main(String[] args) throws IOException, InterruptedException
System.out.println("remaining items: " + subgs.size());

System.out.println("writing new evs...");
try (BufferedWriter bw = new BufferedWriter(new FileWriter(new File("./newEigenvalues.txt")))) {
try (BufferedWriter bw = new BufferedWriter(new FileWriter(new File(String.format("./newEigenvalues-edge%f-node%f.txt", edgeOverlapThreshold, nodeOverlapThreshold))))) {
for(InducedSubgraph subg : subgs)
bw.write(subg.getEigenvalue() +"\n");
} catch (IOException e) {
e.printStackTrace();
}

System.out.println("writing new nodelists...");
try (BufferedWriter bw = new BufferedWriter(new FileWriter(new File("./newCommunities.txt")))) {
try (BufferedWriter bw = new BufferedWriter(new FileWriter(new File(String.format("./newCommunities-edge%f-node%f.txt", edgeOverlapThreshold, nodeOverlapThreshold))))) {
for(InducedSubgraph subg : subgs) {
for (int i : subg.toNodeList())
bw.write(i +" ");
Expand Down

0 comments on commit ed6c6de

Please sign in to comment.