Package ket.math

Examples of ket.math.State


  Vector<State> states;

  public CompoundState(Vector<Argument> args, int displayStyle) {
    states = new Vector<State>();
    for (Argument argument : args) {
      State state = argument.getState();
      states.add(state);
    }
    // Check
    switch (displayStyle) {
      case JOIN:
View Full Code Here


          joinedNames += " " + states.get(i).toHTML();
        }
        return joinedNames;
      case SUBSCRIPT:
        assert size()==2;
        State last = states.lastElement();
        //- String lastString = last instanceof Text ? ((Text) last).getHTMLSubscript() : last.toHTML();
        String lastString = last.isText() ? ((Text) last).getHTMLSubscript() : last.toHTML();
        return states.firstElement().toHTML() + "<SUB>" + lastString + "</SUB>";
      default:
        throw new RuntimeException("illegal display style");
    }
  }
View Full Code Here

TOP

Related Classes of ket.math.State

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.