Options no longer passed to Set; only sample size is needed
parent
216231b888
commit
31b7fb8e44
|
@ -93,7 +93,7 @@ rectest.TestRunner = Class( 'TestRunner',
|
||||||
|
|
||||||
var _self = this,
|
var _self = this,
|
||||||
run = this._setFactory.fromId( options.ralgo,
|
run = this._setFactory.fromId( options.ralgo,
|
||||||
test_case.getSet( options.set ), options
|
test_case.getSet( options.set ), +options.samples
|
||||||
);
|
);
|
||||||
|
|
||||||
// allow test case to initialize its display
|
// allow test case to initialize its display
|
||||||
|
|
|
@ -32,11 +32,11 @@ rectest.set.RandomGroupedSet = Class( 'RandomGroupedSet' )
|
||||||
'private _setPos': 0,
|
'private _setPos': 0,
|
||||||
|
|
||||||
|
|
||||||
__construct: function( base_set, options )
|
__construct: function( base_set, sample_size )
|
||||||
{
|
{
|
||||||
this._set = base_set;
|
this._set = base_set;
|
||||||
this._setLength = this._set.length;
|
this._setLength = this._set.length;
|
||||||
this._samplesRemain = +options.samples || -1;
|
this._samplesRemain = +sample_size || -1;
|
||||||
|
|
||||||
this._reset();
|
this._reset();
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,10 +6,14 @@ rectest.set.Set = Interface( 'Set',
|
||||||
/**
|
/**
|
||||||
* Create a new set from a base set and the given options
|
* Create a new set from a base set and the given options
|
||||||
*
|
*
|
||||||
* @param {Array.<string>} base_set base set
|
* It should be noted that the sample size is required because certain
|
||||||
* @param {Object} options configuration options
|
* algorithms need to understand the data in order to provide a truely
|
||||||
|
* random set across all samples.
|
||||||
|
*
|
||||||
|
* @param {Array.<string>} base_set base set
|
||||||
|
* @param {number} sample_size number of samples to be returned
|
||||||
*/
|
*/
|
||||||
__construct: [ 'base_set', 'options' ],
|
__construct: [ 'base_set', 'sample_size' ],
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
rectest.set.SetFactory = Class( 'SetFactory',
|
rectest.set.SetFactory = Class( 'SetFactory',
|
||||||
{
|
{
|
||||||
'public fromId': function( id, base_set, options )
|
'public fromId': function( id, base_set, sample_size )
|
||||||
{
|
{
|
||||||
var sets = rectest.set;
|
var sets = rectest.set;
|
||||||
|
|
||||||
|
@ -12,6 +12,6 @@ rectest.set.SetFactory = Class( 'SetFactory',
|
||||||
sets.RandomGroupedSet,
|
sets.RandomGroupedSet,
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
][ id ]( base_set, options );
|
][ id ]( base_set, sample_size );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue