public abstract class TopsortLib extends Object
Constructor and Description |
---|
TopsortLib() |
Modifier and Type | Method and Description |
---|---|
static <Id> com.google.common.base.Optional<com.google.common.collect.ImmutableList<Id>> |
sort(com.google.common.collect.ImmutableSet<Id> idSet,
com.google.common.collect.ImmutableSetMultimap<Id,Id> id__parents)
Generic topological sort, starting with node ids and the dependency structure between ids.
|
static <Id> com.google.common.base.Optional<com.google.common.collect.ImmutableList<Id>> |
sort(com.google.common.collect.ImmutableSetMultimap<Id,Id> id__parents)
Generic topological sort, starting with the dependency structure between ids (this function assume
the graph is connected, so all ids have an arc).
|
public static <Id> com.google.common.base.Optional<com.google.common.collect.ImmutableList<Id>> sort(com.google.common.collect.ImmutableSet<Id> idSet, com.google.common.collect.ImmutableSetMultimap<Id,Id> id__parents)
idSet
- The node ids in your dag.id__parents
- The dependency structure of your dag.public static <Id> com.google.common.base.Optional<com.google.common.collect.ImmutableList<Id>> sort(com.google.common.collect.ImmutableSetMultimap<Id,Id> id__parents)
id__parents
- The dependency structure of your dag.Copyright © 2014. All rights reserved.