Biquad class

@constructor
320416
function Biquad (options) {
	if (!(this instanceof Biquad)) return new Biquad(options);

	Through.call(this, options);

	//init values for channels
	this.x1 = [];
	this.x2 = [];
	this.y1 = [];
	this.y2 = [];

	//init coefs
	this.update();
}
205567
public void addQuad (int tint, AffineTransform xf,
                       float left, float top, float right, float bottom,
                       float sl, float st, float sr, float sb) {
    addQuad(tint, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty,
            left, top, right, bottom, sl, st, sr, sb);
  }
395413
function(that) {
		var summ = this._bugsummary;
		var name = that.constructor.$classname || String(that);
		console.error([
			"Bad argument " + summ.shift(),
			"for " + name + ":",
			"Expected " + summ.shift() + ",",
			"got " + summ.shift() + ":",
			summ.shift()
		].join(" "));
	}
1001974
function init(proto) {
    proto.prototype.flush = function flush(to, axis, mside, wside) {
        return util.flush(this, to, axis, mside, wside);
    };

    proto.prototype.snap = function snap(to, axis, orientation, delta) {
        return util.snap(this, to, axis, orientation, delta);
    };

    proto.prototype.calcSnap = function calcSnap(to, axis, orientation, delta) {
        return util.calcSnap(this, to, axis, orientation, delta);
    };

    proto.prototype.midlineTo = function midlineTo(axis, to) {
        return util.midlineTo(this, axis, to);
    };

    proto.prototype.calcmidlineTo = function midlineTo(axis, to) {
        return util.calcmidlineTo(this, axis, to);
    };

    proto.prototype.centerWith = function centerWith(axis, to) {
        util.depreciated('centerWith', true, 'Use align instead.');
        return util.centerWith(this, axis, to);
    };

    if (proto.center) echo('proto already has .center');
    proto.prototype.center = function center(axis) {
        // console.log('center', axis, this.getBounds());
        return util.centerWith(this, axis || 'xyz', util.unitCube(), 0);
    };

    proto.prototype.calcCenter = function centerWith(axis) {
        return util.calcCenterWith(this, axis || 'xyz', util.unitCube(), 0);
    };

    proto.prototype.align = function align(to, axis) {
        // console.log('align', to.getBounds(), axis);
        return util.centerWith(this, axis, to);
    };

    proto.prototype.calcAlign = function calcAlign(to, axis, delta) {
        return util.calcCenterWith(this, axis, to, delta);
    };

    proto.prototype.enlarge = function enlarge(x, y, z) {
        return util.enlarge(this, x, y, z);
    };

    proto.prototype.fit = function fit(x, y, z, a) {
        return util.fit(this, x, y, z, a);
    };

    if (proto.size) echo('proto already has .size');

    proto.prototype.size = function() {
        return util.size(this.getBounds());
    };

    proto.prototype.centroid = function() {
        return util.centroid(this);
    };

    proto.prototype.Zero = function zero() {
        return util.zero(this);
    };

    proto.prototype.Center = function Center(axes) {
        return this.align(util.unitCube(), axes || 'xy');
    };

    proto.Vector2D.prototype.map = function Vector2D_map(cb) {
        return new proto.Vector2D(cb(this.x), cb(this.y));
    };

    proto.prototype.fillet = function fillet(radius, orientation, options) {
        return util.fillet(this, radius, orientation, options);
    };

    proto.prototype.chamfer = function chamfer(radius, orientation, options) {
        return util.chamfer(this, radius, orientation, options);
    };

    proto.prototype.bisect = function bisect(
        axis,
        offset,
        angle,
        rotateaxis,
        rotateoffset,
        options
    ) {
        return util.bisect(
            this,
            axis,
            offset,
            angle,
            rotateaxis,
            rotateoffset,
            options
        );
    };

    proto.prototype.stretch = function stretch(axis, distance, offset) {
        return util.stretch(this, axis, distance, offset);
    };

    proto.prototype.unionIf = function unionIf(object, condition) {
        return condition ? this.union(util.result(this, object)) : this;
    };

    proto.prototype.subtractIf = function subtractIf(object, condition) {
        return condition ? this.subtract(util.result(this, object)) : this;
    };

    proto.prototype._translate = proto.prototype.translate;

    /**
      * This modifies the normal `proto.translate` method to accept
      * multiple translations, adding the translations together.
      * The original translate is available on `proto._translate` and
      * a short circut is applied when only one parameter is given.
      * @return {proto} The resulting object.
      */
    proto.prototype.translate = function translate() {
        if (arguments.length === 1) {
            return this._translate(arguments[0]);
        } else {
            var t = Array.prototype.slice.call(arguments, 0).reduce(function(
                result,
                arg
            ) {
                // console.log('arg', arg);
                result = util.array.addArray(result, arg);
                return result;
            }, [0, 0, 0]);

            // console.log('translate', t);
            return this._translate(t);
        }
    };
}
654610
function qr(A) {
    if (A.shape.length !== 2) {
        throw new Error('Input is not matrix');
    }
    var _a = A.shape, m = _a[0], n = _a[1];
    if (m === 0 || n === 0) {
        throw new Error('Empty matrix');
    }
    var copyA = A.clone();
    var minmn = Math.min(m, n);
    copyA.swapOrder();
    var tau = new common_1.NDArray({ shape: [minmn] });
    lapack.geqrf(copyA.data, m, n, tau.data);
    var r = copyA.clone();
    r.swapOrder();
    r = triu(r.get(':', ':' + minmn));
    var q = copyA.get(':' + n);
    lapack.orgqr(q.data, m, n, minmn, tau.data);
    q.swapOrder();
    return [q, r];
}
721503
function parseClass(params, constructor) {
        var key,
            value,
            saved = {};

        delete params.$locked;

        // Check and save constants to parse later
        if (hasOwn(params, '$constants')) {
            saved.$constants = params.$constants;
            delete params.$constants;
        }

        // Check and save finals to parse later
        if (hasOwn(params, '$finals')) {
            saved.$finals = params.$finals;
            delete params.$finals;
        }

        // Parse members
        parseMembers(params, constructor);

        // Parse constants
        if (saved.$constants) {
            for (key in saved.$constants) {
                value = saved.$constants[key];

                constructor[$class].staticProperties[key] = value;
                constructor[key] = value;
            }
        }

        // Parse finals
        if (saved.$finals) {
            parseMembers(saved.$finals, constructor, true);
        }
    }
807176
function init(names) {  // {{{2
/**
 * Class constructor
 *
 * @method constructor
 */

  this.count = 0;
  this.deps = {};
  this.groups = {};
  this.cb = null;

  if (! names) return;

  this.add(names[0], function(cb) { cb() });
  for (var i = 1; i < names.length; i++) {
    this.add(names[i], names[i-1], function(cb) { cb() });
  }

  return;
}
1237677
function CalculatorPageObject() {
    var m = this[MODEL] = {};

    // Add directive to module.
    angular.module('testApp', [])
        .directive('calculator', calculatorDirective);

    // Create test context.
    var testContext = new AngularTestContext('testApp');

    // Compile and find elements.
    var element = testContext.compile('<calculator></calculator>');

    var inputs = element.find('input');
    expect(inputs.length).toBe(2);

    var button = element.find('button');
    expect(button.length).toBe(1);

    var result = element.find('span span');
    expect(result.length).toBe(1);

    m.input1 = $(inputs[0]);
    m.input2 = $(inputs[1]);
    m.button = button;
    m.result = result;
}
197369
function typal_construct() {
        var o = typal_mix.apply(create(this), arguments);
        var constructor = o.constructor;
        var Klass = o.constructor = function () { return constructor.apply(this, arguments); };
        Klass.prototype = o;
        Klass.mix = typal_mix; // allow for easy singleton property extension
        return Klass;
    }
1248444
static void constructR( DMatrixRMaj R, DMatrixRMaj R_v , DMatrix2x2 R22 ,
							double b1 , double b2 , Vector3D_F64 ca ,
							double sign , DMatrixRMaj tmp )
	{
		tmp.data[0]= R22.a11;
		tmp.data[1]= R22.a12;
		tmp.data[2]= sign*ca.x;

		tmp.data[3]= R22.a21;
		tmp.data[4]= R22.a22;
		tmp.data[5]= sign*ca.y;

		tmp.data[6]= sign*b1;
		tmp.data[7]= sign*b2;
		tmp.data[8]= ca.z;

		CommonOps_DDRM.mult(R_v,tmp,R);
	}
1359372
function getClass() {
  const type = NodeType.ClassType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [];

  // Skip `.`
  pos++;

  const childType = tokens[pos].class_child;
  if (childType === 1) content.push(getInterpolatedVariable());
  else content.push(getIdent());

  return newNode(type, content, line, column);
}
783644
function() {
			var mag = this.x * this.x + this.y * this.y;
			if (mag > 0) {
				mag = 1.0 / Math.sqrt(mag);
				this.x *= mag;
				this.y *= mag;
			}
			return this;
		}
580053
function Class() {
        var i, mixins, mixin, self = this;

        // All construction is actually done in the init method
        if (!initializing) {
          // Run class constuctor
          if (self.init) {
            self.init.apply(self, arguments);
          }

          // Run mixin constructors
          mixins = self.Mixins;
          if (mixins) {
            i = mixins.length;
            while (i--) {
              mixin = mixins[i];
              if (mixin.init) {
                mixin.init.apply(self, arguments);
              }
            }
          }
        }
      }
990211
function createFinalClass(params, constructor) {
        var def = Class.$create(params, constructor);
        def[$class].finalClass = true;

        return def;
    }
110183
function () {
		var a = array.cast( arguments ),
		    t = a.pop(),
		    P = array.chunk( a, 2 ),
		    n = P.length,
		    c, S0, Q0, Q1, Q2, C0, C1, C2, C3;

		if ( n < 2 || n > 4 ) {
			throw new Error( label.error.invalidArguments );
		}

		// Setting variables
		c  = [];
		S0 = 1 - t;
		Q0 = math.sqr( S0 );
		Q1 = 2 * S0 * t;
		Q2 = math.sqr( t );
		C0 = Math.pow( S0, 3 );
		C1 = 3 * Q0 * t;
		C2 = 3 * S0 * Q2;
		C3 = Math.pow( t, 3 );

		// Straight
		if ( n === 2 ) {
			c.push( ( S0 * P[0][0] ) + ( t * P[1][0] ) );
			c.push( ( S0 * P[0][1] ) + ( t * P[1][1] ) );
		}
		// Quadratic
		else if ( n === 3 ) {
			c.push( ( Q0 * P[0][0] ) + ( Q1 * P[1][0] ) + ( Q2 + P[2][0] ) );
			c.push( ( Q0 * P[0][1] ) + ( Q1 * P[1][1] ) + ( Q2 + P[2][1] ) );
		}
		// Cubic
		else if ( n === 4 ) {
			c.push( ( C0 * P[0][0] ) + ( C1 * P[1][0] ) + ( C2 * P[2][0] ) + ( C3 * P[3][0] ) );
			c.push( ( C0 * P[0][1] ) + ( C1 * P[1][1] ) + ( C2 * P[2][1] ) + ( C3 * P[3][1] ) );
		}

		return c;
	}
1258554
def init_algebra(*, default_hs_cls='LocalSpace'):
    
    from qnet.algebra.core.hilbert_space_algebra import LocalSpace
    from qnet.algebra.core.abstract_quantum_algebra import QuantumExpression
    default_hs_cls = getattr(importlib.import_module('qnet'), default_hs_cls)
    if issubclass(default_hs_cls, LocalSpace):
        QuantumExpression._default_hs_cls = default_hs_cls
    else:
        raise TypeError("default_hs_cls must be a subclass of LocalSpace")
807024
function polymorphism(iterator, data, params, cb) {
    var h = artoo.helpers,
        i, d, p, c;

    if (h.isPlainObject(iterator) &&
        !h.isSelector(iterator) &&
        !h.isDocument(iterator) &&
        (iterator.iterator || iterator.data || iterator.params)) {
      d = iterator.data;
      p = h.isPlainObject(iterator.params) ? iterator.params : {};
      i = iterator.iterator;
    }
    else {
      d = data;
      p = h.isPlainObject(params) ? params : {};
      i = iterator;
    }

    // Default values
    d = d || 'text';

    c = typeof cb === 'function' ? cb :
          typeof params === 'function' ? params :
            p.done;

    return [i, d, p, c];
  }