Constructor and Description |
---|
SetUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
areEquals(List<T> l1,
List<T> l2)
Check if the two lists contain exactly the same elements
|
static <T> T |
extractValueFromSingleton(List<T> list) |
static <T> int |
find(List<T> classes,
List<List<T>> powerSet)
Find an element in a power set
|
static <T> int |
find(List<T> classes,
List<T>[] powerSet) |
static <T> List[] |
getSubsets(List<T>[] powerSet,
int cardinality)
Returns sublists having a predetermined length
|
static <T> void |
insertValueinSingleton(List<T> list,
T elem) |
static <T> List<T> |
intersection(List<T> list1,
List<T> list2)
Returns the intersection between two lists
|
static <T> boolean |
isIn(T elem,
List<T> list)
Verifies if an element is in the list
|
static <T> List<T> |
union(List<T> list1,
List<T> list2)
Returns the list that is the union of the two list (without duplicates)
|
public SetUtils()
public static <T> boolean isIn(T elem, List<T> list)
elem
- list
- public static <T> List<T> intersection(List<T> list1, List<T> list2)
T
- list1
- list2
- public static <T> List<T> union(List<T> list1, List<T> list2)
list1
- list2
- public static <T> boolean areEquals(List<T> l1, List<T> l2)
T
- l1
- l2
- public static <T> int find(List<T> classes, List<List<T>> powerSet)
classes
- powerSet
- public static <T> T extractValueFromSingleton(List<T> list)
public static <T> void insertValueinSingleton(List<T> list, T elem)
public static <T> List[] getSubsets(List<T>[] powerSet, int cardinality)
powerSet
- cardinality
- DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann