build/modelscript.umd.js
function tree(A, B, from, to, options) {
                options = options || {};
                for (var o in defaultOptions$n)
                    if (!options.hasOwnProperty(o)) {
                        options[o] = defaultOptions$n[o];
                    }
                var Atree, Btree;
                if (A.sum)
                    Atree = A;
                else
                    Atree = createTree(A.x, A.y, from, to, options.minWindow, options.threshold);
                if (B.sum)
                    Btree = B;
                else
                    Btree = createTree(B.x, B.y, from, to, options.minWindow, options.threshold);
                return S(Atree, Btree, options.alpha, options.beta, options.gamma);
            }
function tree(A, B, from, to, options) {
                options = options || {};
                for (var o in defaultOptions$n)
                    if (!options.hasOwnProperty(o)) {
                        options[o] = defaultOptions$n[o];
                    }
                var Atree, Btree;
                if (A.sum)
                    Atree = A;
                else
                    Atree = createTree(A.x, A.y, from, to, options.minWindow, options.threshold);
                if (B.sum)
                    Btree = B;
                else
                    Btree = createTree(B.x, B.y, from, to, options.minWindow, options.threshold);
                return S(Atree, Btree, options.alpha, options.beta, options.gamma);
            }
function tree ( A , B , from , to , options ) { options = options || { } ; for ( var o in defaultOptions$n ) if ( ! options . hasOwnProperty ( o ) ) { options [ o ] = defaultOptions$n [ o ] ; } var Atree , Btree ; if ( A . sum ) Atree = A ; else Atree = createTree ( A . x , A . y , from , to , options . minWindow , options . threshold ) ; if ( B . sum ) Btree = B ; else Btree = createTree ( B . x , B . y , from , to , options . minWindow , options . threshold ) ; return S ( Atree , Btree , options . alpha , options . beta , options . gamma ) ; }
Builds a tree based in the spectra and compares this trees
@param {{x: Array<number>, y: Array<number>}} A - first spectra to be compared
@param {{x: Array<number>, y: Array<number>}} B - second spectra to be compared
@param {number} from - the low limit of x
@param {number} to - the top limit of x
@param {{minWindow: number, threshold: number, alpha: number, beta: number, gamma: number}} options
@returns {number} similarity measure between the spectra
Builds a tree based in the spectra and compares this trees