+###*
+ * Create an equation to describe a circuit.
+ * @module equation_builder
+ * @requires matrixy
+ * @requires chai
+###
 {Matrixy} = require 'matrixy'
 {expect} = require 'chai'
 

  nodalAdmittances: createBlankMatrix(size)
  inputs: createBlankMatrix(size, 1)

###
 * Creates a blank equation which can be built up using 'stamps' for each element in the circuit.
 * @param {int} numOfNodes
 * @param {int} numOfVSources = 0
 * @return {object}
###
module.exports.createEquationBuilder = ({numOfNodes, numOfVSources} ) ->
  numOfVSources ?= 0

        current: directional extendApi CC
        voltage: directional extendApi VC

  stamp = (value) ->
    ohms: nonDirectional stampResistance(value)
    siemens: nonDirectional stampConductance(value)
    volts: directional stampVoltageSource(value)
    amps: directional stampCurrentSource(value)

  ###*
   * @namespace module:equation_builder~stamp
  ###

  ###*
   * API for stamping a controlled source.
   * @example
   * # Stamp a Voltage-Controlled-Current-Source (VCCS)
   * stamp.a.gain.of(10).multiplying.a.voltage.from(1).to(2)
       .controlling.a.currentSource.from(2).to(3)
   * @memberof module:equation_builder~stamp
   * @namespace module:equation_builder~stamp.a
   * @property {module:equation_builder~stamp.a.gain} gain
  ###
  stamp.a =
    ###*
     * @memberof module:equation_builder~stamp.a
     * @namespace module:equation_builder~stamp.a.gain
     * @property {module:equation_builder~stamp.a.gain.of} of
    ###
    gain:
      ###*
       * Stamp the gain for a controlled source.
       * @function module:equation_builder~stamp.a.gain.of
       * @param {Number} gain
       * @return todo
      ###
      of: stampGain

  stamp: stamp
  getEquation: ->
    nodalAdmittances: nodalAdmittances
    inputs: inputs
