Esempio n. 1
0
  public KSTransition deepCopy(KSState sa, KSState sb) {
    FunctionTransition ret = makeCopy(sa, sb);

    for (Constant c : constants) {
      ret.addConstant(c.makeCopy());
    }

    // TODO shallow copy OK??
    ret.setFunctions(funcs);

    ret.refTransition = null;
    return ret;
  }
Esempio n. 2
0
  public FunctionTransition makeCopy(KSState sa, KSState sb) {
    FunctionTransition ret = makeLocalCopy();
    ret.setEnds(sa, sb);

    ret.constants = constants;
    ret.funcs = funcs;
    ret.assignments = assignments;

    FunctionTransition rtr = this;
    while (rtr.refTransition != null) {
      rtr = rtr.refTransition;
    }
    ret.refTransition = rtr;
    //	E.info("copied coded transition from " + hashCode() + " to " + ret.hashCode() + " " +
    // rtr.getSysID());

    ret.fwdFactor = fwdFactor;
    ret.revFactor = revFactor;
    copyTemperatureTo(ret);
    return ret;
  }