protected void resetTypes() { final Iterator<DependencySet> i = _depends.values().iterator(); while (i.hasNext()) { final DependencySet d = i.next(); if (d.getBranch() != DependencySet.NO_BRANCH) i.remove(); } }
protected void resetTypes() { final Iterator<DependencySet> i = _depends.values().iterator(); while (i.hasNext()) { final DependencySet d = i.next(); if (d.getBranch() != DependencySet.NO_BRANCH) i.remove(); } }
public void reset(final boolean onlyApplyTypes) { assert onlyApplyTypes || isRootNominal() : "Only asserted individuals can be reset: " + this; if (OpenlletOptions.USE_COMPLETION_QUEUE) _abox.getCompletionQueue().add(new QueueElement(this)); if (onlyApplyTypes) return; if (_pruned != null) unprune(DependencySet.NO_BRANCH); _mergedTo = this; _mergeDepends = DependencySet.INDEPENDENT; _merged = null; final Iterator<DependencySet> i = _differents.values().iterator(); while (i.hasNext()) { final DependencySet d = i.next(); if (d.getBranch() != DependencySet.NO_BRANCH) i.remove(); } resetTypes(); _inEdges.reset(); }
public void reset(final boolean onlyApplyTypes) { assert onlyApplyTypes || isRootNominal() : "Only asserted individuals can be reset: " + this; if (OpenlletOptions.USE_COMPLETION_QUEUE) _abox.getCompletionQueue().add(new QueueElement(this)); if (onlyApplyTypes) return; if (_pruned != null) unprune(DependencySet.NO_BRANCH); _mergedTo = this; _mergeDepends = DependencySet.INDEPENDENT; _merged = null; final Iterator<DependencySet> i = _differents.values().iterator(); while (i.hasNext()) { final DependencySet d = i.next(); if (d.getBranch() != DependencySet.NO_BRANCH) i.remove(); } resetTypes(); _inEdges.reset(); }
/** * Resets the edges in this list to only asserted edges. */ public void reset() { for (int i = 0; i < size(); i++) { final Edge e = get(i); if (e.getDepends().getBranch() != DependencySet.NO_BRANCH) removeEdge(i--); } } }
/** * Resets the edges in this list to only asserted edges. */ public void reset() { for (int i = 0; i < size(); i++) { final Edge e = get(i); if (e.getDepends().getBranch() != DependencySet.NO_BRANCH) removeEdge(i--); } } }
@Override public void setClash(final Clash clash) { if (clash != null) { if (_logger.isLoggable(Level.FINER)) { _logger.finer("CLSH: " + clash); if (clash.getDepends().max() > _branchIndex && _branchIndex != -1) _logger.severe("Invalid _clash dependency " + clash + " > " + _branchIndex); } if (_branchIndex == DependencySet.NO_BRANCH && clash.getDepends().getBranch() == DependencySet.NO_BRANCH) _assertedClashes.add(clash); if (_clash != null) { _logger.finer(() -> "Clash was already set \nExisting: " + _clash + "\nNew : " + clash); if (_clash.getDepends().max() < clash.getDepends().max()) return; } } _clash = clash; // CHW - added for incremental deletions if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getDependencyIndex().setClashDependencies(_clash); }
@Override public void setClash(final Clash clash) { if (clash != null) { if (_logger.isLoggable(Level.FINER)) { _logger.finer("CLSH: " + clash); if (clash.getDepends().max() > _branchIndex && _branchIndex != -1) _logger.severe("Invalid _clash dependency " + clash + " > " + _branchIndex); } if (_branchIndex == DependencySet.NO_BRANCH && clash.getDepends().getBranch() == DependencySet.NO_BRANCH) _assertedClashes.add(clash); if (_clash != null) { _logger.finer(() -> "Clash was already set \nExisting: " + _clash + "\nNew : " + clash); if (_clash.getDepends().max() < clash.getDepends().max()) return; } } _clash = clash; // CHW - added for incremental deletions if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getDependencyIndex().setClashDependencies(_clash); }
private void updateBranchesOfABox(final AddBranchDependency branch, final ABox abox) { final List<Branch> branches = abox.getBranches(); // decrease branch id for each branch after the branch we're removing // also need to change the dependency set for each label for (int i = branch.getBranch().getBranchIndexInABox(); i < branches.size(); i++) { final Branch br = branches.get(i); // cast for ease DependencySet termDepends = br.getTermDepends(); // update the term depends in the branch if (termDepends.getBranch() > branch.getBranch().getBranchIndexInABox()) termDepends = termDepends.copy(termDepends.getBranch() - 1); for (int j = branch.getBranch().getBranchIndexInABox(); j < _kb.getABox().getBranches().size(); j++) if (termDepends.contains(j)) { termDepends.remove(j); termDepends.add(j - 1); break; } br.setTermDepends(termDepends); } branches.remove(branch.getBranch()); // remove the actual branch }
private void updateBranchesOfABox(final AddBranchDependency branch, final ABox abox) { final List<Branch> branches = abox.getBranches(); // decrease branch id for each branch after the branch we're removing // also need to change the dependency set for each label for (int i = branch.getBranch().getBranchIndexInABox(); i < branches.size(); i++) { final Branch br = branches.get(i); // cast for ease DependencySet termDepends = br.getTermDepends(); // update the term depends in the branch if (termDepends.getBranch() > branch.getBranch().getBranchIndexInABox()) termDepends = termDepends.copy(termDepends.getBranch() - 1); for (int j = branch.getBranch().getBranchIndexInABox(); j < _kb.getABox().getBranches().size(); j++) if (termDepends.contains(j)) { termDepends.remove(j); termDepends.add(j - 1); break; } br.setTermDepends(termDepends); } branches.remove(branch.getBranch()); // remove the actual branch }
throw new InternalReasonerException(" Restore merge error: " + ind + " not pruned"); ind.unprune(ind.getPruned().getBranch()); // unprune to prune _branch
throw new InternalReasonerException(" Restore merge error: " + ind + " not pruned"); ind.unprune(ind.getPruned().getBranch()); // unprune to prune _branch