Package graphql.schema.impl
Class StronglyConnectedComponentsTopologicallySorted
- java.lang.Object
-
- graphql.schema.impl.StronglyConnectedComponentsTopologicallySorted
-
public class StronglyConnectedComponentsTopologicallySorted extends java.lang.Object
This class returns a list of strongly connected components (SCC) which are topologically sorted. The algorithm is from https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm The elements inside a SCC are additionally sorted top. itself: normally this is not possible, but we are using for this "inner sort" only the "reverseDependencies" Map which is made out of dependencies based one the Java references between Schema elements, which can't form a cycle. The inner sort algorithm is from https://en.wikipedia.org/wiki/Topological_sorting#Depth-first_search
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.util.List<GraphQLSchemaElement>>
getStronglyConnectedComponentsTopologicallySorted(java.util.Map<GraphQLSchemaElement,java.util.List<GraphQLSchemaElement>> reverseDependencies, java.util.Map<java.lang.String,java.util.List<GraphQLSchemaElement>> typeRefReverseDependencies)
-
-
-
Method Detail
-
getStronglyConnectedComponentsTopologicallySorted
public static java.util.List<java.util.List<GraphQLSchemaElement>> getStronglyConnectedComponentsTopologicallySorted(java.util.Map<GraphQLSchemaElement,java.util.List<GraphQLSchemaElement>> reverseDependencies, java.util.Map<java.lang.String,java.util.List<GraphQLSchemaElement>> typeRefReverseDependencies)
-
-