All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bbn.bue.common.evaluation.FMeasureCountsFunctions Maven / Gradle / Ivy

The newest version!
package com.bbn.bue.common.evaluation;

import com.google.common.base.Function;
import javax.annotation.Generated;
import javax.annotation.ParametersAreNonnullByDefault;

/**
 * Projection functions and predicates that corresponds to attributes of {@link _FMeasureCounts}.
 */
@SuppressWarnings("all")
@ParametersAreNonnullByDefault
@Generated({"Immutables.generator", "_FMeasureCounts"})
public final class FMeasureCountsFunctions {
  private FMeasureCountsFunctions() {}

  /**
   * Projection function from instance of FMeasureCounts to attribute {@link _FMeasureCounts#falsePositives() falsePositives}.
   * @return {@code falsePositives} function instance
   */
  public static Function falsePositives() {
    return FalsePositivesFunction.INSTANCE;
  }

  private enum FalsePositivesFunction implements Function {
    INSTANCE;
    @Override
    public Double apply(FMeasureCounts input) {
      return input.falsePositives();
    }
    @Override
    public String toString() {
      return "FMeasureCountsFunctions.falsePositives()";
    }
  }

  /**
   * Projection function from instance of FMeasureCounts to attribute {@link _FMeasureCounts#falseNegatives() falseNegatives}.
   * @return {@code falseNegatives} function instance
   */
  public static Function falseNegatives() {
    return FalseNegativesFunction.INSTANCE;
  }

  private enum FalseNegativesFunction implements Function {
    INSTANCE;
    @Override
    public Double apply(FMeasureCounts input) {
      return input.falseNegatives();
    }
    @Override
    public String toString() {
      return "FMeasureCountsFunctions.falseNegatives()";
    }
  }

  /**
   * Projection function from instance of FMeasureCounts to attribute {@link _FMeasureCounts#numPredicted() numPredicted}.
   * @return {@code numPredicted} function instance
   */
  public static Function numPredicted() {
    return NumPredictedFunction.INSTANCE;
  }

  private enum NumPredictedFunction implements Function {
    INSTANCE;
    @Override
    public Double apply(FMeasureCounts input) {
      return input.numPredicted();
    }
    @Override
    public String toString() {
      return "FMeasureCountsFunctions.numPredicted()";
    }
  }

  /**
   * Projection function from instance of FMeasureCounts to attribute {@link _FMeasureCounts#numItemsInKey() numItemsInKey}.
   * @return {@code numItemsInKey} function instance
   */
  public static Function numItemsInKey() {
    return NumItemsInKeyFunction.INSTANCE;
  }

  private enum NumItemsInKeyFunction implements Function {
    INSTANCE;
    @Override
    public Double apply(FMeasureCounts input) {
      return input.numItemsInKey();
    }
    @Override
    public String toString() {
      return "FMeasureCountsFunctions.numItemsInKey()";
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy