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

org.opentripplanner.raptor.api.model.DominanceFunction Maven / Gradle / Ivy

The newest version!
package org.opentripplanner.raptor.api.model;

/**
 * Represents a multi-criteria dominance function for comparing two int values:
 * {@code left} and {@code right}.
 */
@FunctionalInterface
public interface DominanceFunction {
  /**
   * Return a function which never dominates anything. This is the same as
   * ignoring a criteria in the pareto dominance function.
   */
  static DominanceFunction noop() {
    return (l, r) -> false;
  }

  /**
   * Evaluates if left dominates right, if not return {@link false}.
   * 

* Note! The function is not symmetric: *

    *
  • If left dominates right, right may or may not dominate left.
  • *
  • If left does not dominate right, right may or may not dominate left.
  • *
*/ boolean leftDominateRight(int left, int right); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy