Esempio n. 1
0
  /**
   * Returns if the classifier of the class subsumes the classifier passed as a parameter.
   *
   * @param cl is the subsumed classifier.
   * @return a boolean indicating if it subsumes
   */
  public boolean doesSubsume(Classifier cl) {

    if (rep.getAction() != cl.rep.getAction()) return false;

    if (parameters.couldSubsume()) {
      if (rep.isMoreGeneral(cl.rep)) {
        return true;
      }
    }
    return false;
  } // end doesSubsume
Esempio n. 2
0
  /**
   * Returns if the classifier of the class subsumes the classifier passed as a parameter.
   *
   * @param cl is the subsumed classifier.
   * @return a boolean indicating if it subsumes
   */
  public boolean doesSubsume(Classifier cl) {
    int i;

    // First, check if the condition is the same
    if (action != cl.getAction()) return false;

    // Then, check that is more general
    if (parameters.couldSubsume()) {
      for (i = 0; i < rep.length; i++) {
        if (!rep[i].isMoreGeneral(cl.rep[i])) return false;
      }
      return true;
    }
    return false;
  } // end doesSubsume
Esempio n. 3
0
 /**
  * Returns if the classifier can subsume. The classifier has to be sufficiently accurate and
  * sufficiently experienced to subsume another classifier.
  *
  * @return a boolean indicating if the classifier can subsume.
  */
 public boolean couldSubsume() {
   return parameters.couldSubsume();
 } // end couldSubsume