Skip to content

Yet another framework-agnostic tarjan scc detection algorithm implementation for Java applications

License

Notifications You must be signed in to change notification settings

yalibs/yatarjan

Repository files navigation

yatarjan

Yet another framework-agnostic tarjan scc detection algorithm implementation for Java applications

See the paper for detailed info about the algorithm.

Usage

public class Main {
    public static void main(String[] args) {
        // Triangle circular graph in the form of a vertex-edge mapping
        var graph = new HashMap<String,List<String>>();
        graph.put("a", List.of("b", "c")); // vertex "a" is connected to "b" and "c"
        graph.put("b", List.of("c")); // vertex "b" is connected to "c"
        graph.put("c", List.of("a")); // vertex "c" is connected to "a"
        var sccs = Tarjan.getStronglyConnectedComponents(graph);
        // sccs = [[a,b,c]]
    }
}

About

Yet another framework-agnostic tarjan scc detection algorithm implementation for Java applications

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages