lib/processing.js
function(signal1, signal2, options){
    options = options || {};
    options.epsilon = options.epsilon || 1E-08;
    var sig1 = Signal(signal1);
    var sig2 = Signal(signal2);
    if(signal1.length != signal2.length) return false;
    var diffSQ = _.reduce(_.range(signal1.length), function(d,idx){
      var diff = (sig1[idx].value-sig2[idx].value);
        return d + diff * diff;
    },0);
    return diffSQ/signal1.length < options.epsilon;
  }
function(signal1, signal2, options){
    options = options || {};
    options.epsilon = options.epsilon || 1E-08;
    var sig1 = Signal(signal1);
    var sig2 = Signal(signal2);
    if(signal1.length != signal2.length) return false;
    var diffSQ = _.reduce(_.range(signal1.length), function(d,idx){
      var diff = (sig1[idx].value-sig2[idx].value);
        return d + diff * diff;
    },0);
    return diffSQ/signal1.length < options.epsilon;
  }
function ( signal1 , signal2 , options ) { options = options || { } ; options . epsilon = options . epsilon || 1E-08 ; var sig1 = Signal ( signal1 ) ; var sig2 = Signal ( signal2 ) ; if ( signal1 . length != signal2 . length ) return false ; var diffSQ = _ . reduce ( _ . range ( signal1 . length ) , function ( d , idx ) { var diff = ( sig1 [ idx ] . value - sig2 [ idx ] . value ) ; return d + diff * diff ; } , 0 ) ; return diffSQ / signal1 . length < options . epsilon ; }
determines if two signals can be considered equal.
determines if two signals can be considered equal .