From 588dad42411998d9411ad889368169be1eb7c14f Mon Sep 17 00:00:00 2001 From: Peter Bloem Date: Wed, 13 Jul 2016 18:07:10 +0200 Subject: [PATCH] Added cmd line switch for search depth --- .../nl/peterbloem/motive/exec/Compare.java | 2 +- .../java/nl/peterbloem/motive/exec/Run.java | 24 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/nl/peterbloem/motive/exec/Compare.java b/src/main/java/nl/peterbloem/motive/exec/Compare.java index 7cf7375..000d863 100644 --- a/src/main/java/nl/peterbloem/motive/exec/Compare.java +++ b/src/main/java/nl/peterbloem/motive/exec/Compare.java @@ -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. diff --git a/src/main/java/nl/peterbloem/motive/exec/Run.java b/src/main/java/nl/peterbloem/motive/exec/Run.java index 56eb54d..b5e8c18 100644 --- a/src/main/java/nl/peterbloem/motive/exec/Run.java +++ b/src/main/java/nl/peterbloem/motive/exec/Run.java @@ -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; @@ -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);