/** * get entry from Trie, return null if no entry is present yet * * * @param pos */ List<CalculationNode> get(final int pos) { if (pos == 0) { return list; } final Trie child = children[changeStateNodes[pos - 1]]; if (child == null) { return null; } return child.get(pos - 1); }
/** return current set of calculation nodes based on the set of StateNodes that have changed * */ private List<CalculationNode> getCurrentCalculationNodes() { List<CalculationNode> calcNodes = trie.get(nrOfChangedStateNodes); if (calcNodes != null) { // the list is pre-calculated return calcNodes; } // we need to calculate the list of CalculationNodes now try { calcNodes = calculateCalcNodePath(); } catch (Exception e) { e.printStackTrace(); System.exit(1); } trie.set(calcNodes, nrOfChangedStateNodes); // System.err.print(Arrays.toString(changeStateNodes) + ":"); // for (CalculationNode node : calcNodes) { // Log.warning.print(node.m_sID + " "); // } // System.err.println(); return calcNodes; } // getCurrentCalculationNodes