From 8a357a88a2cf8f8eec3c678c67be3822c6e9f94a Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 7 Apr 2009 20:12:05 +0000 Subject: [PATCH] right...exponential should be exponential, so I might want to increment the exponent git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@315 348d0f76-0448-11de-a6fe-93d51630548a --- .../dataSources/shards/ExpGrowthShardStrategy.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ExpGrowthShardStrategy.java b/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ExpGrowthShardStrategy.java index 07a11fbb8..5a7e479a5 100644 --- a/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ExpGrowthShardStrategy.java +++ b/java/src/org/broadinstitute/sting/gatk/dataSources/shards/ExpGrowthShardStrategy.java @@ -26,13 +26,13 @@ import net.sf.samtools.SAMSequenceDictionary; *

* Class LinearShard *

- * A linear strategy, very very similar to adaptive + * A exponential strategy */ public class ExpGrowthShardStrategy extends ShardStrategy { // fixed size private long baseSize = 100000; - private long currentExp = 1; + private long currentExp = 0; /** * the constructor, taking a seq dictionary to parse out contigs @@ -42,7 +42,7 @@ public class ExpGrowthShardStrategy extends ShardStrategy { ExpGrowthShardStrategy(SAMSequenceDictionary dic, long startSize) { super(dic); this.baseSize = startSize; - currentExp = 1; + currentExp = 0; } /** @@ -53,7 +53,7 @@ public class ExpGrowthShardStrategy extends ShardStrategy { ExpGrowthShardStrategy(ShardStrategy strat) { super(strat); this.baseSize = strat.nextShardSize(); - currentExp = 1; + currentExp = 0; } /** @@ -63,7 +63,7 @@ public class ExpGrowthShardStrategy extends ShardStrategy { */ public void adjustNextShardSize(long size) { baseSize = size; - currentExp = 1; + currentExp = 0; } /** @@ -72,6 +72,8 @@ public class ExpGrowthShardStrategy extends ShardStrategy { * @return the next shard size */ protected long nextShardSize() { + // we grow the exponentially, we just have to make sure we start at zero + ++currentExp; return (long) Math.floor(Math.pow((double) baseSize, (double) currentExp)); }