private void addEdge(final int in, final int out) { _nodes[in].addOutput(_nodes[out]); }
public EntityNode<E> createEntityNode(final E entity) { EntityNode<E> node = _entityNodes.get(entity); if (node == null) { node = new EntityNode<>(entity); _entityNodes.put(entity, node); } return node; }
private void activateNode(final EntityNode<E> node) { if (node.isActive()) throw new IllegalStateException(); _affectedNodes.add(node); _activatedEntities.addAll(node.getEntities()); _waitingQueue.add(node); node.inputActivated(); if (_logger.isLoggable(Level.FINE)) _logger.fine("Activated: " + node); }
for (final E entity : node.getEntities()) rep.addEntity(entity); _entityNodes.put(entity, rep); for (final Node input : node.getInputs()) input.addOutput(rep); for (final Node output : node.getOutputs()) rep.addOutput(output); node.removeInOuts(); count++;
for (final Object n : node.getEntities()) if (module == null && node.getOutputs().size() == 1) final Node output = node.getOutputs().iterator().next(); module = new PairSet<>(outputModule, node.getEntities()); module = engine.computeReachable(node.getEntities()); _logger.fine(() -> "Setting the module for " + node.getEntities()); for (final OWLEntity n : node.getEntities())
if (initialNode == null) throw new IllegalArgumentException("Unknown entity: " + initialEntity); if (!initialNode.isActive()) activateNode(initialNode); _activatedEntities.addAll(entityNode(outputNode).getEntities());
private void testOutputs(final int n, final int... outputs) { final Set<Node> computed = _nodes[n].getOutputs(); final Set<Node> expected = new HashSet<>(); for (final int i : outputs) expected.add(_nodes[i]); assertEquals(expected, computed); }
for (final E entity : node.getEntities()) rep.addEntity(entity); _entityNodes.put(entity, rep); for (final Node input : node.getInputs()) input.addOutput(rep); for (final Node output : node.getOutputs()) rep.addOutput(output); node.removeInOuts(); count++;
for (final Object n : node.getEntities()) if (module == null && node.getOutputs().size() == 1) final Node output = node.getOutputs().iterator().next(); module = new PairSet<>(outputModule, node.getEntities()); module = engine.computeReachable(node.getEntities()); _logger.fine(() -> "Setting the module for " + node.getEntities()); for (final OWLEntity n : node.getEntities())
if (initialNode == null) throw new IllegalArgumentException("Unknown entity: " + initialEntity); if (!initialNode.isActive()) activateNode(initialNode); _activatedEntities.addAll(entityNode(outputNode).getEntities());
private void activateNode(final EntityNode<E> node) { if (node.isActive()) throw new IllegalStateException(); _affectedNodes.add(node); _activatedEntities.addAll(node.getEntities()); _waitingQueue.add(node); node.inputActivated(); if (_logger.isLoggable(Level.FINE)) _logger.fine("Activated: " + node); }
private void addEdge(final int in, final int out) { _nodes[in].addOutput(_nodes[out]); }
public EntityNode<E> createEntityNode(final E entity) { EntityNode<E> node = _entityNodes.get(entity); if (node == null) { node = new EntityNode<>(entity); _entityNodes.put(entity, node); } return node; }