/** * Creates a dependency set with no dependency and single explanation atom */ public DependencySet(ATermAppl explainAtom) { this.depends = DependencySet.ZERO; this.setExplain( SetUtils.singleton( explainAtom ) ); }
/** * Creates a dependency set with no dependency and single explanation atom */ public DependencySet(ATermAppl explainAtom) { this.depends = DependencySet.ZERO; this.setExplain( SetUtils.singleton( explainAtom ) ); }
/** * Adds the given object to the set but saves memory space * by allocating only the required amount for small sets. The * idea is to use the specialized empty set and singleton set * implementations (which are immutable) for the sets of size * 0 and 1. If the set is empty a new singleton set is created, * if set has one element we create a new set with two elements, * otherwise we simply add the element to the given set.This * technique is most useful if the expected set size is 0 or 1. * * @param o * @param set * @return */ public static <T> Set<T> add( T o, Set<T> set ) { int size = set.size(); if( size == 0 ) set = singleton( o ); else if( size == 1 ) { T existing = set.iterator().next(); if( !existing.equals( o ) ) set = binary( existing, o ); } else set.add( o ); return set; }
/** * Adds the given object to the set but saves memory space * by allocating only the required amount for small sets. The * idea is to use the specialized empty set and singleton set * implementations (which are immutable) for the sets of size * 0 and 1. If the set is empty a new singleton set is created, * if set has one element we create a new set with two elements, * otherwise we simply add the element to the given set.This * technique is most useful if the expected set size is 0 or 1. * * @param o * @param set * @return */ public static <T> Set<T> add( T o, Set<T> set ) { int size = set.size(); if( size == 0 ) set = singleton( o ); else if( size == 1 ) { T existing = set.iterator().next(); if( !existing.equals( o ) ) set = binary( existing, o ); } else set.add( o ); return set; }
if( conceptSatisfiability ) { x = ATermUtils.CONCEPT_SAT_IND; individuals = SetUtils.singleton( x );
if( conceptSatisfiability ) { x = ATermUtils.CONCEPT_SAT_IND; individuals = SetUtils.singleton( x );
boolean isType = !isConsistent( SetUtils.singleton( x ), notC, false ); t.stop();
boolean isType = !isConsistent( SetUtils.singleton( x ), notC, false ); t.stop();
Set<ATermAppl> concepts = ATermUtils.isAnd( concept ) ? ATermUtils.listToSet( (ATermList) concept.getArgument( 0 ) ) : SetUtils.singleton( concept );
Set<ATermAppl> concepts = ATermUtils.isAnd( concept ) ? ATermUtils.listToSet( (ATermList) concept.getArgument( 0 ) ) : SetUtils.singleton( concept );
public void applyFunctionalMaxRule( Individual x, Role s, ATermAppl c, DependencySet ds ) { Set<Role> functionalSupers = s.getFunctionalSupers(); if( functionalSupers.isEmpty() ) functionalSupers = SetUtils.singleton( s ); LOOP: for( Iterator<Role> it = functionalSupers.iterator(); it.hasNext(); ) {
public void applyFunctionalMaxRule( Individual x, Role s, ATermAppl c, DependencySet ds ) { Set<Role> functionalSupers = s.getFunctionalSupers(); if( functionalSupers.isEmpty() ) functionalSupers = SetUtils.singleton( s ); LOOP: for( Iterator<Role> it = functionalSupers.iterator(); it.hasNext(); ) {