Package org.mindswap.pellet.utils

Examples of org.mindswap.pellet.utils.SizeEstimate


      state = EnumSet.of( ReasoningState.CONSISTENCY );
      consistent = kb.consistent;

      abox.setComplete( true );

      estimate = new SizeEstimate( this );
    }
    else {
      state = EnumSet.noneOf( ReasoningState.class );
    }
View Full Code Here


    // reset flags
    changes.clear();

    instances.clear();

    estimate = new SizeEstimate( this );
    abox.setDoExplanation( explain );

    if( !canUseIncConsistency ) {
      if( log.isLoggable( Level.FINER ) )
        log.finer( "Expressivity..." );
View Full Code Here

    // update expressivity given this individual
    expChecker.updateWithIndividual( i, c );

    // update the size estimate as this could be a new individual
    estimate = new SizeEstimate( this );
  }
View Full Code Here

      state = EnumSet.of( ReasoningState.CONSISTENCY );
      consistent = kb.consistent;

      abox.setComplete( true );

      estimate = new SizeEstimate( this );
    }
    else {
      state = EnumSet.noneOf( ReasoningState.class );
    }
View Full Code Here

* @author Petr Kremen
*/
public class QuerySizeEstimator {

  public static void computeSizeEstimate(final Query query) {
    final SizeEstimate sizeEstimate = query.getKB().getSizeEstimate();

    final Set<ATermAppl> concepts = new HashSet<ATermAppl>();
    final Set<ATermAppl> properties = new HashSet<ATermAppl>();
//    boolean fullDone = false;
    for (final QueryAtom atom : query.getAtoms()) {
//      if (!fullDone) {
//        switch (atom.getPredicate()) {
//        case Type:
//          if (query.getDistVars()
//              .contains(atom.getArguments().get(1))) {
//            fullDone = true;
//          }
//          break;
//        case PropertyValue:
//          if (query.getDistVars()
//              .contains(atom.getArguments().get(1))) {
//            fullDone = true;
//          }
//          break;
//        case SameAs:
//        case DifferentFrom:
//          break;
//        default:
////          fullDone = true;
//          ;
//        }
//        if (fullDone) {
//          sizeEstimate.computeAll();
//        }
//      }

      for (final ATermAppl argument : atom.getArguments()) {
        if (!ATermUtils.isVar(argument)) {
          if ((query.getKB().isClass(argument) || ATermUtils
              .isComplexClass(argument))
              && !sizeEstimate.isComputed(argument)) {
            concepts.add(argument);
          }

          if (query.getKB().isProperty(argument)
              && !sizeEstimate.isComputed(argument)) {
            properties.add(argument);
          }
        }
      }
    }

    sizeEstimate.compute(concepts, properties);
  }
View Full Code Here

    // reset flags
    changes.clear();

    instances.clear();

    estimate = new SizeEstimate( this );
    abox.setDoExplanation( explain );

    if( !canUseIncConsistency ) {
      if( log.isLoggable( Level.FINER ) )
        log.finer( "Expressivity..." );
View Full Code Here

    // update expressivity given this individual
    expChecker.updateWithIndividual( i, c );

    // update the size estimate as this could be a new individual
    estimate = new SizeEstimate( this );
  }
View Full Code Here

TOP

Related Classes of org.mindswap.pellet.utils.SizeEstimate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.