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

org.opentripplanner.transit.raptor.util.paretoset.ParetoComparator Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.transit.raptor.util.paretoset;

/**
 * Comparator used by the {@link ParetoSet} to compare to elements for dominance. There is 4 outcomes
 * of a comparison between a left and right vector:
 * 
    *
  • Left dominates right - At least one left criteria dominates, and no right dominance exist *
  • Right dominates left - At least one right criteria dominates, and no left dominance exist *
  • Mutual dominance - At least one left criteria dominates right and at least one right criteria dominates left *
  • No dominance - all criteria is equals or no dominance exist *
* To implement the comparator you only need to implement the comparison in one direction - if dominance exist. * * @param The pareto set element type */ @FunctionalInterface public interface ParetoComparator { /** * At least one of the left criteria dominates one of the corresponding right criteria. */ boolean leftDominanceExist(T left, T right); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy