Class: SamplesGenerator

SamplesGenerator

Members

staticSamplesGenerator.SAMPLE_COUNTNumber

Number of samples to take of each value length.

allowDuplicatesBoolean

true if duplicate samples collection should be allowed, false otherwise.

Default Value: {false}

customSampleCountNumber

Custom number of samples to take of each value length.

Default Value: {null}

dataFactoryfunction

Function which give the data to collect samples.

samplesMap

Samples prepared for calculations.

Default Value: {null}

Methods

generateColumnSamples(colRange, rowRange){Object}

Generate samples for column. You can control which area should be sampled by passing colRange object and rowRange object.

Parameters:
Name Type Description
colRange Object

Column index.

rowRange Object

Column index.

Returns: {Object}

generateRowSamples(rowRange, colRange){Object}

Generate samples for row. You can control which area should be sampled by passing rowRange object and colRange object.

Parameters:
Name Type Description
rowRange Object | Number
colRange Object
Returns: {Object}

generateSample(type, range, specifierValue){Map}

Generate sample for specified type (row or col).

Parameters:
Name Type Description
type String

Samples type row or col.

range Object
specifierValue Number
Returns: {Map}

generateSamples(type, range, specifierRange){Map}

Generate collection of samples.

Parameters:
Name Type Description
type String

Type to generate. Can be col or row.

range Object
specifierRange Object | Number
Returns: {Map}

getSampleCount(){Number}

Get the sample count for this instance.

Returns: {Number}

setAllowDuplicates(allowDuplicates)

Set if the generator should accept duplicate values.

Parameters:
Name Type Description
allowDuplicates Boolean

true to allow duplicate values.

setSampleCount(sampleCount)

Set the sample count.

Parameters:
Name Type Description
sampleCount Number

Number of samples to be collected.