Skip to content

Commit

Permalink
Added cmd line switch for search depth
Browse files Browse the repository at this point in the history
  • Loading branch information
pbloem committed Jul 13, 2016
1 parent 446a258 commit 588dad4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/main/java/nl/peterbloem/motive/exec/Compare.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class Compare
/**
* The depth to which to search when using the DS model
*/
public int betaSearchDepth = -1;
public int betaSearchDepth = 3;

/**
* Number of threads to use when sampling for the DS model.
Expand Down
24 changes: 15 additions & 9 deletions src/main/java/nl/peterbloem/motive/exec/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ public class Run {
@Option(name="--filetype", usage="Filetype: edgelist or gml")
private static String filetype = "edgelist";

@Option(name="--undirected", usage="If the input should be interpeted as undirected.")
@Option(name="--undirected", usage="If the input should be interpeted as undirected (only for edgelist files).")
private static boolean undirected = false;

@Option(
name="--full.depth",
usage="The search depth for the DS model.")
private static int dsDepth = 3;

@Option(name="--help", usage="Print usage information.", aliases={"-h"}, help=true)
private static boolean help = false;

Expand Down Expand Up @@ -215,19 +220,20 @@ else if ("gml".equals(filetype.toLowerCase().trim()))
throw new IllegalArgumentException("There was a problem reading the input file ("+file+").");
}

Compare large = new Compare();
Compare full = new Compare();

large.dataName = file.getName();
large.data = data;
large.motifMinSize = minSize;
large.motifMaxSize = maxSize;
large.maxMotifs = maxMotifs;
large.motifSamples = samples;
full.dataName = file.getName();
full.data = data;
full.motifMinSize = minSize;
full.motifMaxSize = maxSize;
full.maxMotifs = maxMotifs;
full.motifSamples = samples;
full.betaSearchDepth = dsDepth;

Global.log().info("Starting experiment.");
Functions.tic();
try {
large.main();
full.main();
} catch(IOException e)
{
throw new RuntimeException("Encountered a problem when writing the results to disk.", e);
Expand Down

0 comments on commit 588dad4

Please sign in to comment.