
org.opentripplanner.raptor.api.model.DominanceFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
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