lib/matcher/GroupManager.js
function simulateMatch(N) {

        for (var i = 0 ; i < N ; i++) {

            var rm = new RMatcher(),
            elements = getElements(),
            pools = getPools();

            //          console.log('NN ' , numbers);
            //          console.log(elements);
            //          console.log(pools)
            rm.init(elements, pools);

            var matched = rm.match();

            if (!rm.allGroupsDone()) {
                console.log('ERROR');
                console.log(rm.options.elements);
                console.log(rm.options.pools);
                console.log(matched);
            }

            for (var j = 0; j < rm.groups.length; j++) {
                var g = rm.groups[j];
                for (var h = 0; h < g.elements.length; h++) {
                    if (g.matched[h].length !== g.rowLimit) {
                        console.log('Wrong match: ' +  h);

                        console.log(rm.options.elements);
                        console.log(rm.options.pools);
                        console.log(matched);
                    }
                }
            }
        }

    }
function simulateMatch(N) {

        for (var i = 0 ; i < N ; i++) {

            var rm = new RMatcher(),
            elements = getElements(),
            pools = getPools();

            //          console.log('NN ' , numbers);
            //          console.log(elements);
            //          console.log(pools)
            rm.init(elements, pools);

            var matched = rm.match();

            if (!rm.allGroupsDone()) {
                console.log('ERROR');
                console.log(rm.options.elements);
                console.log(rm.options.pools);
                console.log(matched);
            }

            for (var j = 0; j < rm.groups.length; j++) {
                var g = rm.groups[j];
                for (var h = 0; h < g.elements.length; h++) {
                    if (g.matched[h].length !== g.rowLimit) {
                        console.log('Wrong match: ' +  h);

                        console.log(rm.options.elements);
                        console.log(rm.options.pools);
                        console.log(matched);
                    }
                }
            }
        }

    }
function simulateMatch ( N ) { for ( var i = 0 ; i < N ; i ++ ) { var rm = new RMatcher ( ) , elements = getElements ( ) , pools = getPools ( ) ; //          console.log('NN ' , numbers); //          console.log(elements); //          console.log(pools) rm . init ( elements , pools ) ; var matched = rm . match ( ) ; if ( ! rm . allGroupsDone ( ) ) { console . log ( 'ERROR' ) ; console . log ( rm . options . elements ) ; console . log ( rm . options . pools ) ; console . log ( matched ) ; } for ( var j = 0 ; j < rm . groups . length ; j ++ ) { var g = rm . groups [ j ] ; for ( var h = 0 ; h < g . elements . length ; h ++ ) { if ( g . matched [ h ] . length !== g . rowLimit ) { console . log ( 'Wrong match: ' + h ) ; console . log ( rm . options . elements ) ; console . log ( rm . options . pools ) ; console . log ( matched ) ; } } } } }
console.log(getElements()) console.log(getPools())
console . log ( getElements () ) console . log ( getPools () )