public class Multimaps extends Object
Modifier and Type | Method and Description |
---|---|
static <A,B> Multimap<A,B> |
all(Set<A> dom,
Set<B> ran) |
static <A,B> Multimap<A,B> |
asMultimap(Set<Map.Entry<A,B>> things) |
static <A,B> Map<A,B> |
choose(Multimap<A,B> m) |
static <A> Multimap<A,A> |
compose(Multimap<A,A>... r) |
static <A,B,C> Multimap<A,C> |
compose(Multimap<A,B> r,
Multimap<B,C> s) |
static <A,B,C,D> Multimap<A,D> |
compose(Multimap<A,B> r,
Multimap<B,C> s,
Multimap<C,D> t) |
static <A,B,C,D,E> |
compose(Multimap<A,B> r,
Multimap<B,C> s,
Multimap<C,D> t,
Multimap<D,E> u) |
static <A,B,C,D,E,F> |
compose(Multimap<A,B> r,
Multimap<B,C> s,
Multimap<C,D> t,
Multimap<D,E> u,
Multimap<E,F> v) |
static <A,B,C> Multimap<A,C> |
composeAs(Multimap<A,B> r,
Multimap<B,C> s,
Multimap<A,C> result) |
static <A,B> Multimap<A,B> |
empty() |
static <A,B> Multimap<A,B> |
forward(Map<A,B> m) |
static <A> Multimap<A,A> |
id(Set<A> support) |
static <A,B> Map<A,B> |
intoMap(Multimap<A,B> in,
Map<A,B> out) |
static <A,B> Multimap<B,A> |
inverse(Multimap<A,B> r) |
static void |
main(String[] args) |
static <A,B> Multimap<A,B> |
maxMatching(Multimap<A,B> rel) |
static <A> boolean |
reflexiveClosure(Multimap<A,A> r) |
static <A> boolean |
reflexiveClosure(Multimap<A,A> r,
Set<? extends A> s) |
static <A,B> Multimap<A,B> |
singleton(A a,
B b) |
static <A,B> Multimap<A,B> |
slice(Relation<A,B> r,
Set<? extends A> dom,
Set<? extends B> ran) |
static <A> Set<A> |
support(Multimap<A,A> r) |
static <A> boolean |
symmetricClosure(Multimap<A,A> r) |
static <A,B,C> Multimap<A,C> |
toCompose(Multimap<A,B> r,
Multimap<B,C> s) |
static <A,B,C,D> Multimap<A,D> |
toCompose(Multimap<A,B> r,
Multimap<B,C> s,
Multimap<C,D> t) |
static <A,B,C> Multimap<B,C> |
toSpan(Function<? super A,? extends B> left,
Function<? super A,? extends C> right,
Collection<? extends A> gen)
span(f, g, a) = { (f(x),g(x)) | x <- s }
|
static <A,B,C,D> Multimap<C,D> |
toSpan(Function<? super A,? extends C> left,
Function<? super B,? extends D> right,
Multimap<? extends A,? extends B> gen) |
static <A,B> Multimap<A,B> |
toSum(Collection<? extends A> dom,
Function<? super A,? extends Collection<? extends B>> fun) |
static <A> Multimap<A,A> |
toSymmetricClosure(Multimap<A,A> r) |
static <A> Multimap<A,A> |
toTransitiveClosure(Multimap<A,A> r) |
static <A> boolean |
transitiveClosure(Multimap<A,A> r) |
static <A> boolean |
transitiveClosureSparse(Multimap<A,A> r) |
static <A,B> Multimap<A,B> |
unmodifiableMultimap(Multimap<? extends A,? extends B> m) |
public static <A,B> Multimap<A,B> empty()
public static <A,B> Multimap<A,B> singleton(A a, B b)
public static <A,B,C,D> Multimap<A,D> toCompose(Multimap<A,B> r, Multimap<B,C> s, Multimap<C,D> t)
public static <A,B,C> Multimap<A,C> composeAs(Multimap<A,B> r, Multimap<B,C> s, Multimap<A,C> result)
public static <A,B,C,D> Multimap<A,D> compose(Multimap<A,B> r, Multimap<B,C> s, Multimap<C,D> t)
public static <A,B,C,D,E> Multimap<A,E> compose(Multimap<A,B> r, Multimap<B,C> s, Multimap<C,D> t, Multimap<D,E> u)
public static <A,B,C,D,E,F> Multimap<A,F> compose(Multimap<A,B> r, Multimap<B,C> s, Multimap<C,D> t, Multimap<D,E> u, Multimap<E,F> v)
public static <A> boolean reflexiveClosure(Multimap<A,A> r)
public static <A> boolean symmetricClosure(Multimap<A,A> r)
public static <A> boolean transitiveClosure(Multimap<A,A> r)
public static <A> boolean transitiveClosureSparse(Multimap<A,A> r)
public static <A,B> Multimap<A,B> slice(Relation<A,B> r, Set<? extends A> dom, Set<? extends B> ran)
public static <A,B> Multimap<A,B> toSum(Collection<? extends A> dom, Function<? super A,? extends Collection<? extends B>> fun)
public static <A,B> Multimap<A,B> unmodifiableMultimap(Multimap<? extends A,? extends B> m)
public static <A,B,C> Multimap<B,C> toSpan(Function<? super A,? extends B> left, Function<? super A,? extends C> right, Collection<? extends A> gen)
public static <A,B,C,D> Multimap<C,D> toSpan(Function<? super A,? extends C> left, Function<? super B,? extends D> right, Multimap<? extends A,? extends B> gen)
public static void main(String[] args)
see also the complete user documentation .