E - Domain class of the mapsF - Range class of the mapspublic class MapTools<E,F> extends Object
| Constructor and Description |
|---|
MapTools() |
| Modifier and Type | Method and Description |
|---|---|
Set<Map<E,F>> |
allBijections(Collection<E> domain,
Collection<F> range)
Computes all bijections from E to F.
|
Set<Map<E,F>> |
allMaps(Map<Set<E>,Set<F>> relations)
Computes the complete set of maps from E to F such that the following
condition holds.
|
Set<Map<E,F>> |
allMaps(Set<? extends E> domain,
Set<? extends F> range)
This methods computes all maps from domain to range.
|
Set<Map<E,F>> |
allMapsSingleSource(Map<E,Set<F>> relations)
Computes the complete set of maps from E to F such that the following
condition holds.
|
Map<E,F> |
combine(Set<Map<E,F>> singleMaps)
Combines all maps in singleMaps to one maps containing
every assignment of each map in singleMaps.
|
static boolean |
isInjective(Map<? extends Object,? extends Object> map)
Checks whether the given map is injective, i.e.
|
public Set<Map<E,F>> allMaps(Map<Set<E>,Set<F>> relations)
relations - a map from sets of E to sets of F.public Set<Map<E,F>> allMapsSingleSource(Map<E,Set<F>> relations)
relations - a map from sets of E to sets of F.public Set<Map<E,F>> allBijections(Collection<E> domain, Collection<F> range)
domain - some set.range - some set.public Set<Map<E,F>> allMaps(Set<? extends E> domain, Set<? extends F> range)
domain - a set of elements.range - a set of elementspublic Map<E,F> combine(Set<Map<E,F>> singleMaps) throws IllegalArgumentException
singleMaps - the set of maps to be combined.IllegalArgumentException - if one key is used
in more than one map of singleMaps.Copyright © 2018. All rights reserved.