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

The rows range to generate the samples.

colRange object

The column range to generate the samples.

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

The range to generate the samples.

specifierValue number

The range to generate the samples.

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

The range to generate the samples.

specifierRange object | number

The range to generate the samples.

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.

Class: SamplesGenerator