Package ca.nengo.model

Examples of ca.nengo.model.StructuralException


   */
  public DecodedTermination(Node node, String name, float[][] transform, LinearSystem dynamics, Integrator integrator)
      throws StructuralException {

    if (dynamics.getInputDimension() != 1 || dynamics.getOutputDimension() != 1) {
      throw new StructuralException("Dynamics must be single-input single-output");
    }

    myOutputDimension = transform.length;
    setTransform(transform);

View Full Code Here


   * @param transform New transform
   * @throws StructuralException If the transform is not a matrix or has the wrong size
   */
  public void setTransform(float[][] transform) throws StructuralException {
    if ( !MU.isMatrix(transform) ) {
      throw new StructuralException("Given transform is not a matrix");
    }
    if (transform.length != myOutputDimension) {
      throw new StructuralException("This transform must have " + myOutputDimension + " rows");
    }

    myTransform = transform;

    if  (myStaticBias == null) {
View Full Code Here

   * @throws StructuralException if the dynamics of this Termination are not LTI in controllable
   *     canonical form
   */
  public void setTau(float tau) throws StructuralException {
    if (!myTauMutable) {
      throw new StructuralException("This Termination has immutable dynamics "
        + "(must be LTI in controllable-canonical form to change time constant online");
    }

    setDynamics(CanonicalModel.changeTimeConstant((LTISystem) myDynamicsTemplate, tau));
  }
View Full Code Here

     * @see ca.nengo.model.plasticity.impl.PlasticEnsembleTermination#updateTransform(float, int, int)
     */
    @Override
    public void updateTransform(float time, int start, int end) throws StructuralException {
        if (myModTermName == null || myOriginName == null) {
            throw new StructuralException("Origin name not set in PESTermination");
        }

        if (myFilteredInput == null) {
          return;
        }
View Full Code Here

    }
   
    public void updateTransform(float time, int start, int end)
            throws StructuralException {
      if (myOriginName == null) {
            throw new StructuralException("Origin name not set in BCMTermination");
        }
     
      if (myFilteredInput == null || myFilteredOutput == null) {
          return;
        }
View Full Code Here

  }

  private static void checkFunctionDimension(Function[] functions) throws StructuralException {
    for (Function function : functions) {
      if (function.getDimension() != 1) {
        throw new StructuralException("All functions in a FunctionOrigin must be 1-D functions of time");
      }
    }
  }
View Full Code Here

  /**
   * @see ca.nengo.model.Node#getOrigin(java.lang.String)
   */
  public Origin getOrigin(String name) throws StructuralException {
    if (!ORIGIN_NAME.equals(name)) {
      throw new StructuralException("This Node only has origin FunctionInput.ORIGIN_NAME");
    }

    return myOrigin;
  }
View Full Code Here

  /**
   * @see ca.nengo.model.Node#getTermination(java.lang.String)
   */
  public Termination getTermination(String name) throws StructuralException {
    throw new StructuralException("This node has no Terminations");
  }
View Full Code Here

      throws StructuralException {

    super(name, nodes, factory);

    if (nodes.length != encoders.length) {
      throw new StructuralException("There are " + nodes.length + " Nodes but "
          + encoders.length + " encoding vectors");
    }

    myDimension = encoders[0].length;
    for (int i = 1; i < encoders.length; i++) {
      if (encoders[i].length != myDimension) {
        throw new StructuralException("Encoders have different lengths");
      }
    }
    myEncoders = encoders;

    myDecodingApproximators = new HashMap<String, LinearApproximator>(10);
View Full Code Here

       
        if (origin.getExpressModel() != null) {
          try {
            origin.getExpressModel().update();
          } catch (SimulationException e) {
            throw new StructuralException("Can't update ExpressModel for radius change", e);
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of ca.nengo.model.StructuralException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.