Package org.destecs.core.contract

Examples of org.destecs.core.contract.IVariable


  private void checkStepStructVariableSize(StepStruct ctResult,
      Simulator simulator) throws SimulationException
  {

    IVariable varTarget = null;
    int varSize = -1;
    for (StepStructoutputsStruct elem : ctResult.outputs)
    {
      for (IVariable var : contract.getVariables())
      {
        if (var.getName().equals(elem.name))
        {
          varTarget = var;
          varSize = calculateSizeFromShape(varTarget.getDimensions());
          break;
        }
      }

      if (varTarget != null && elem.value.size() != varSize)
      {
        engineInfo(simulator, elem.name + " expected matrix size: "
            + varSize + " in shape: (" + varTarget.getDimensions()
            + ") but received: " + elem.value.size() + "elements");
        throw new SimulationException(simulator, "Variable "
            + elem.name + " does not have the appropriate size");
      }
    }
View Full Code Here

TOP

Related Classes of org.destecs.core.contract.IVariable

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.