Exemple #1
0
  /**
   * Returns default capabilities of the classifier.
   *
   * @return the capabilities of this classifier
   */
  public Capabilities getCapabilities() {
    Capabilities result;

    if (m_Classifier != null) {
      result = m_Classifier.getCapabilities();
    } else {
      result = super.getCapabilities();
    }

    result.setMinimumNumberInstances(0);

    // set dependencies
    for (Capability cap : Capability.values()) result.enableDependency(cap);

    return result;
  }
  /**
   * Returns default capabilities of the associator.
   *
   * @return the capabilities of this associator
   */
  public Capabilities getCapabilities() {
    Capabilities result;

    if (getFilter() == null) {
      result = super.getCapabilities();
      result.disableAll();
    } else {
      result = getFilter().getCapabilities();
    }

    result.enable(Capability.NO_CLASS);

    // set dependencies
    for (Capability cap : Capability.values()) result.enableDependency(cap);

    return result;
  }
  /**
   * Returns combined capabilities of the base classifiers, i.e., the capabilities all of them have
   * in common.
   *
   * @return the capabilities of the base classifiers
   */
  public Capabilities getCapabilities() {
    Capabilities result;
    int i;

    if (getClassifiers().length == 0) {
      result = new Capabilities(this);
      result.disableAll();
    } else {
      result = (Capabilities) getClassifier(0).getCapabilities().clone();
      for (i = 1; i < getClassifiers().length; i++) result.and(getClassifier(i).getCapabilities());
    }

    // set dependencies
    for (Capability cap : Capability.values()) result.enableDependency(cap);

    result.setOwner(this);

    return result;
  }