public GraphVarImpl(Graph base) { super(base); varToNode = HashBiMap.create(); nodeGenerator = (v) -> NodeFactory.createURI("var://" + v.getName()); toGraph = (n) -> n.isVariable() ? varToNode.computeIfAbsent((Var)n, (v) -> nodeGenerator.apply(v)) : n; fromGraph = (n) -> { Var v = varToNode.inverse().get(n); // Can't use getOrDefault because we can't pass a Node as default arg Node r = v == null ? n : v; return r; }; }
if (t != null) { final O o = mealy.getTransitionOutput(t); outputIndices.computeIfAbsent(o, ii -> outputIndices.size()); final S n = mealy.getSuccessor(t); pw.printf("%s/%s %d %d%n",
final Integer intermediateState = outputTransitions.computeIfAbsent( outputTransition, ii -> { final Integer outputIndex = outputIndices.computeIfAbsent( o, iii -> inputs.size() + outputIndices.size());