public StateTreeString(StateTreePair st, TrainingString to) { this( st.getState(), st.getTree(), st.getStart(), st.getEnd(), to, to.getStartIndex(), to.getEndIndex()); }
public boolean equals(Object obj) { if (!obj.getClass().equals(this.getClass())) return false; StateTreeString s = (StateTreeString) obj; boolean ans = (state.equals(s.state) && i.equals(s.i) && o.equals(s.o) && align[0] == s.align[0] && align[1] == s.align[1] && align[2] == s.align[2] && align[3] == s.align[3]); return ans; }
public StateTreeString(Symbol s, TreeItem ti, int is, int ie, TrainingString to, int os, int oe) { align = new int[4]; state = s; i = ti; align[0] = is; align[1] = ie; o = to; align[2] = os; align[3] = oe; // to match variable cluster -- hashcode of symbol, tree, tree indices, and training string // alone (no indices) // Debug.debug(true, "StateTreeString: hash of "+toString()); hsh = new Hash(s.getHash()); hsh = hsh.sag(ti.getHash()); hsh = hsh.sag(new Hash(is)); hsh = hsh.sag(new Hash(ie)); hsh = hsh.sag(to.getHash()); }