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

timeBench.data.util.IntervalComparator Maven / Gradle / Ivy

Go to download

TimeBench, a flexible, easy-to-use, and reusable software library written in Java that provides foundational data structures and algorithms for time- oriented data in Visual Analytics.

The newest version!
/************************************************************************
 *
 * 1. This software is for the purpose of demonstrating one of many
 * ways to implement the algorithms in Introduction to Algorithms,
 * Second edition, by Thomas H. Cormen, Charles E. Leiserson, Ronald
 * L. Rivest, and Clifford Stein.  This software has been tested on a
 * limited set of test cases, but it has not been exhaustively tested.
 * It should not be used for mission-critical applications without
 * further testing.
 *
 * 2. McGraw-Hill licenses and authorizes you to use this software
 * only on a microcomputer located within your own facilities.
 *
 * 3. You will abide by the Copyright Law of the United Sates.
 *
 * 4. You may prepare a derivative version of this software provided
 * that your source code indicates that it based on this software and
 * also that you have made changes to it.
 *
 * 5. If you believe that you have found an error in this software,
 * please send email to [email protected].  If you have a
 * suggestion for an improvement, please send email to
 * [email protected].
 *
 ***********************************************************************/

package timeBench.data.util;

/**
 * Implements an interval whose endpoints are real numbers.
 */

public interface IntervalComparator {

    /**
     *
     * @param i The other interval.
     * @return true if this interval overlaps
     * i, false otherwise.
     */

	/**
	 * Returns whether two intervals overlap.
	 * @param lo1 the lower end of the 1st interval 
	 * @param hi1 the lower end of the 1st interval
	 * @param lo2 the upper end of the 2nd interval
	 * @param hi2 the upper end of the 2nd interval
	 */
	boolean match(long lo1, long hi1, long lo2, long hi2);

	int compare(long lo1, long hi1, long lo2, long hi2);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy