.. java:import:: fr.inria.tapenade.representation TapEnv TapIntList ========== .. java:package:: fr.inria.tapenade.utils :noindex: .. java:type:: public final class TapIntList List of int's, simply chained forward. Fields ------ head ^^^^ .. java:field:: public int head :outertype: TapIntList The head int in this list. tail ^^^^ .. java:field:: public TapIntList tail :outertype: TapIntList The tail of this list. Constructors ------------ TapIntList ^^^^^^^^^^ .. java:constructor:: public TapIntList(int head, TapIntList tail) :outertype: TapIntList Creates a new list cell with given "head" and "tail". Methods ------- add ^^^ .. java:method:: public static TapIntList add(TapIntList list, int value) :outertype: TapIntList Returns list with value added if not already present addIntoSorted ^^^^^^^^^^^^^ .. java:method:: public static TapIntList addIntoSorted(TapIntList list, int elem) :outertype: TapIntList Add a new int "elem" into the (already sorted) given list. addOffset ^^^^^^^^^ .. java:method:: public static TapIntList addOffset(TapIntList list, int offset) :outertype: TapIntList :return: a copy of "list" with each number increased with "offset". append ^^^^^^ .. java:method:: public static TapIntList append(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: a new TapIntList, concatenation of "list1" followed by "list2". Caution: the result shares structure with "list2". appendIfAbsent ^^^^^^^^^^^^^^ .. java:method:: public final void appendIfAbsent(int n) :outertype: TapIntList Adds n at the end of this list iff it is not already there. contains ^^^^^^^^ .. java:method:: public static boolean contains(TapIntList list, int val) :outertype: TapIntList :return: true if value "val" is found in the given "list". contains ^^^^^^^^ .. java:method:: public static boolean contains(TapIntList list, TapIntList vals) :outertype: TapIntList :return: true if all given "vals" are contained in the given "list". copy ^^^^ .. java:method:: public static TapIntList copy(TapIntList list) :outertype: TapIntList :return: a copy of the given list. dump ^^^^ .. java:method:: public void dump() throws java.io.IOException :outertype: TapIntList Prints the contents of this TapIntList onto TapEnv.curOutputStream(). equalLists ^^^^^^^^^^ .. java:method:: public static boolean equalLists(TapIntList list1, TapIntList list2) :outertype: TapIntList intersection ^^^^^^^^^^^^ .. java:method:: public static TapIntList intersection(TapIntList list, TapIntList interList) :outertype: TapIntList :return: the intersection of "list" and "interList". Caution: "list" may be modified and the result shares structure with "list". intersects ^^^^^^^^^^ .. java:method:: public static boolean intersects(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: true if "list1" and "list2" have at least one int in common. length ^^^^^^ .. java:method:: public static int length(TapIntList list) :outertype: TapIntList :return: the length of current list. Returns 0 if list is null. maxElem ^^^^^^^ .. java:method:: public static int maxElem(TapIntList list) :outertype: TapIntList :return: the maximal element of "list", and -1 if list is empty. minElem ^^^^^^^ .. java:method:: public static int minElem(TapIntList list) :outertype: TapIntList :return: the minimal element of "list", and -1 if list is empty. minus ^^^^^ .. java:method:: public static TapIntList minus(TapIntList list, TapIntList minusList) :outertype: TapIntList :return: "list" without elements in "minusList". Caution: "list" may be modified and the result shares structure with "list". newR ^^^^ .. java:method:: public void newR(int val) :outertype: TapIntList Adds new int "val" at the tail of this list. placdl ^^^^^^ .. java:method:: public TapIntList placdl(int n) :outertype: TapIntList Replaces the tail of this list by a new list cell, whose head is "n", and whose tail is the previous tail of this list. :return: this new list cell. quickUnion ^^^^^^^^^^ .. java:method:: public static TapIntList quickUnion(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: the union of "list1" and "list2". Does not add elements of list2 that are already in list1. remove ^^^^^^ .. java:method:: public static TapIntList remove(TapIntList list, int value) :outertype: TapIntList Returns list with value removed if present removeAbove ^^^^^^^^^^^ .. java:method:: public static TapIntList removeAbove(TapIntList list, int max) :outertype: TapIntList Returns a copy of list, without all elements above max reverse ^^^^^^^ .. java:method:: public static TapIntList reverse(TapIntList list) :outertype: TapIntList :return: a reversed copy of the given "list". sort ^^^^ .. java:method:: public static TapIntList sort(TapIntList list) :outertype: TapIntList :return: a sorted (increasing order) copy of the given list. sortedContains ^^^^^^^^^^^^^^ .. java:method:: public static boolean sortedContains(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: true if "list1" contains "list2". Both list1 and list2 must be sorted from 0 up, otherwise result is undefined. sortedIntersects ^^^^^^^^^^^^^^^^ .. java:method:: public static boolean sortedIntersects(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: true if "list1" intersects "list2". Both list1 and list2 must be sorted from 0 up, otherwise result is undefined. toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: TapIntList union ^^^^^ .. java:method:: public static TapIntList union(TapIntList list1, TapIntList list2) :outertype: TapIntList :return: a new list, concatenation of "list1" followed by "list2", with duplicates removed.