diff --git a/config.json b/config.json index fc4b9d318..3df8497fb 100644 --- a/config.json +++ b/config.json @@ -1,8 +1,3 @@ { - "root": "./cottontaildb", - "statistics" : { - "threshold" : 1.0, - "probability" : 0.5, - "randomGeneratorName": "L32X64MixRandom" - } + "root": "/cottontaildb-data" } \ No newline at end of file diff --git a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/config/StatisticsConfig.kt b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/config/StatisticsConfig.kt index 313c1bd9d..2bc76f7b3 100644 --- a/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/config/StatisticsConfig.kt +++ b/cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/config/StatisticsConfig.kt @@ -7,7 +7,7 @@ import java.util.random.RandomGenerator * Config for Cottontail DB's management of statistics. * * @author Florian Burkhardt - * @version 1.0.0 + * @version 1.0.1 */ @Serializable data class StatisticsConfig( @@ -24,28 +24,29 @@ data class StatisticsConfig( /** The minimum sample size. The statistics manager makes sure, that at least this many sample are gathered, regardless of the [sampleProbability]. */ val minimumSampleSize: Long = 100_000L, - /** Defines the false positive probability used by the BloomFilter when detecting the numberOfDistinctElements. + /** + * Defines the false positive probability used by the BloomFilter when detecting the numberOfDistinctElements. + * * The false positive probability is represented by a float value between 0 and 1, and it determines the desired maximum probability of false positives that the filter will generate. - * The lower the false positive probability, the larger the size of the Bloom filter and the more expensive it is to use and maintain.*/ + * The lower the false positive probability, the larger the size of the Bloom filter and the more expensive it is to use and maintain. + */ val falsePositiveProbability: Double = 0.01, // Default is 1%. Typical value between 1% to 10% /** The random number generator to use. */ val randomGeneratorName: String = "L32X64MixRandom", -) -{ +) { init { require(this.threshold in 0.0f .. 1.0f) { "The threshold must lie between 0.0 and 1.0 but is ${this.threshold}."} require(this.sampleProbability in 0.0f .. 1.0f) { "The probability must lie between 0.0 and 1.0 but is ${this.sampleProbability}."} require(this.falsePositiveProbability in 0.0f .. 1.0f) { "The falsePositiveProbability must lie between 0.0 and 1.0 but is ${this.falsePositiveProbability}."} } - /** * Creates and returns a new [RandomGenerator] instance. * * @return [RandomGenerator] */ - fun randomGenerator() = RandomGenerator.of(this.randomGeneratorName) + fun randomGenerator(): RandomGenerator = RandomGenerator.of(this.randomGeneratorName) }