finitedomain
Version:
A fast feature rich finite domain solver
23 lines (21 loc) • 991 B
JavaScript
/**
* @typedef {Object.<{key:$val_strat_config}>} $val_strat_configs
*
* Each var in this object gets a value distribution strategy override as specified by the object.
*/
/**
* @typedef {Object} $val_strat_config
* @property {string} valtype Value distribution type override for by name of the key
* // valtype=markov:
* @property {$matrix_row[]} matrix The first row in order for which the boolean is not off will be used
* @property {number[]} legend Determines which values are valid at all. The domain acts like a mask on this.
* @property {Function} random Seeded randomizer function passed on by external party
* // valtype=list:
* @property {number[]} list In order, pick these values first
*/
/**
* @typedef {Object} $matrix_row
* @property {number[]} vector
* @property {string|function} [boolVarName] Determines the var index for determining whether the row is "on"
* @property {number} [_boolVarIndex] Determines whether the row should be considered at all
*/