Example #1
0
  /**
   * Indicate if the current representation is more general than the representation passed as a
   * parameter.
   *
   * @param r is the representation to which the current representation is compared.
   * @return a boolean indicating if the current representation is more general.
   */
  public boolean isMoreGeneral(Representation r) {
    boolean ret = false;
    // We need to check the condition for the "insertInPSubsumingCl
    if (action != r.action) return false;

    if (numberOfDontCareSymbols() >= r.numberOfDontCareSymbols()) {
      for (int i = 0; i < rep.length; i++) {
        if (!rep[i].isMoreGeneral(r.rep[i])) return false;
      }
      return true;
    }

    return false;
  }
Example #2
0
 /**
  * Returns the number of don't care symbols in the classifier. It is used by the action set
  * subsumption
  *
  * @return a double with the number of don't care symbols.
  */
 public double numberOfDontCareSymbols() {
   return rep.numberOfDontCareSymbols();
 }