Uses of Interface
org.graph4j.Graph
Packages that use Graph
Package
Description
The main interfaces and classes for representing and using graphs.
Clique related algorithms, such as enumerating all maximal cliques of a graph.
Algorithms for the bandwith graph coloring problem.
Algorithms for the equitable graph coloring problem.
Algorithms for analyzing connectivity of graphs and digraphs.
Algorithms for determining eulerian circuits and trails.
Graph generators of various kinds.
Reading and writing graphs in various formats.
Algorithms for testing graph isomorphism.
Algorithms for determining matchings, such as the maximum cardinality matching in bipartite graphs.
Classes responsible with calculating various graph measures (degrees, number of traingles, etc.).
Classes responsible with calculating various graph metrics (girth, radius, diameter, etc.).
Algorithms that produce various orderings of the vertices of a graph.
Algorithms for graph realization problems.
Algorithms related to paths and cycles.
Algorithms related to shortest paths, such as Dijkstra, Bellman-Ford, Floyd-Warshall, etc.
Minimum spanning tree algorithms, such as Prim's and Kruskal's.
Support algorithms for various type of graphs (bipartite, tournament, etc.).
Implementations of the depth-first search (DFS) and breadth-first search (BFS)
algorithms, using both iterator and visitor patterns.
Utility classes, such as apecialized collection for vertices and edges.
Algorithms for the Vertex Separator Problem (VSP).
-
Uses of Graph in org.graph4j
Subinterfaces of Graph in org.graph4jModifier and TypeInterfaceDescriptioninterfaceDigraph<V,E> Represents a directed graph.interfaceDirectedMultigraph<V,E> Multiple (parallel) edges are allowed.interfaceDirectedPseudograph<V,E> Multiple (parallel) edges are allowed.interfaceMultigraph<V,E> Multiple (parallel) edges are allowed.interfaceNetwork<V,E> Represents a single commodity transportation (flow) network.interfacePseudograph<V,E> Self loops and multiple (parallel) edges are allowed.Fields in org.graph4j declared as GraphModifier and TypeFieldDescriptionprotected final GraphGraphAlgorithm.graphprotected final GraphSimpleGraphAlgorithm.graphprotected final GraphUndirectedGraphAlgorithm.graphMethods in org.graph4j that return GraphModifier and TypeMethodDescriptionGraphBuilder.buildGraph()Builds an undirected graph, without multiple edges or self loops.Graph.complement()Creates the complement of the graph.Graph.copy()Creates and returns an identical copy of the graph.Graph.copy(boolean vertexWeights, boolean vertexLabels, boolean edges, boolean edgeWeights, boolean edgeLabels) Creates and returns a copy of the graph.static GraphGraphUtils.createIntersectionGraph(List<Graph> graphs, boolean vertexLabeled) Creates the intersection graph of the vertex sets of the specified graphs.An intersection graph is a graph where each vertex corresponds to a set, and there is an edge between two vertices if and only if the corresponding sets intersect.GraphUtils.createLineGraph(Graph graph) Creates the line graph of an undirected graph.static GraphGraphUtils.createSupportGraph(Graph graph) Convenience method for obtaining the support graph of a digraph, multigraph or pseudograph.static GraphGraphUtils.disjointUnion(Graph... graphs) Performs the disjoint union operation.GraphAlgorithm.getGraph()Returns the input graph on which the algorithm is executed.SimpleGraphAlgorithm.getGraph()static GraphPerforms the join operation on the specified graphs.static GraphGraphUtils.mapVertexNumbers(Graph graph, int[] vertices) Creates a new graph by mapping the vertex numbers in the input graph to the specified values, while preserving the edges.static GraphCreates a new graph by rotating the vertex numbers in the input graph by a specified distance, while preserving the edges.static GraphCreates a new graph by shuffling the vertex numbers in the input graph, while preserving the edges.Graph.subgraph(int... vertices) Creates and returns the subgraph induced by an array of vertices.Graph.subgraph(Collection<Edge> edges) Creates and returns the subgraph generated by a collection of edges.Creates and returns the subgraph induced by a set of vertices.Digraph.supportGraph()Creates the support graph of this digraph.Multigraph.supportGraph()The support graph of a multigraph or a pseudograph G is an undirected graph containing all the vertices of G, self loops are removed and multiple edges are merged into a single one.static GraphPerforms the union of the specified graph.Methods in org.graph4j with parameters of type GraphModifier and TypeMethodDescriptiondefault voidAdds the vertices and edges of another graph.static intGraphUtils.computeEdgeConnectivity(Graph graph) Computes the edge connectivity number, that is the minimum size of a set of edges whose removal disconnects the graph.static intGraphUtils.computeVertexConnectivity(Graph graph) Computes the vertex connectivity number, that is the minimum size of a set of vertices whose removal disconnects the graph.static doubleGraphUtils.computeWeight(Graph graph, Collection<Edge> edges) Computes the sum of the weights of the edges in a specified collectionstatic DigraphGraphUtils.createAcyclicOrientation(Graph graph) Creates the acyclic orientation of an undirected graph.GraphUtils.createLineGraph(Graph graph) Creates the line graph of an undirected graph.static GraphGraphUtils.createSupportGraph(Graph graph) Convenience method for obtaining the support graph of a digraph, multigraph or pseudograph.static GraphGraphUtils.disjointUnion(Graph... graphs) Performs the disjoint union operation.static VertexSetGraphUtils.getVertices(Graph graph, Collection<Edge> edges) Determines the set of distinct vertices belonging to a collection of edges.static booleanGraphTests.hasOreProperty(Graph graph) Checks if an undirected graph has Ore's property:deg(v) + deg(u) >= |V|, for every pair of distinct non-adjacent vertices v and u.static booleanDetermines if the graph is acyclic, meaning it does not contain any cycle.static booleanGraphTests.isBiconnected(Graph graph) Determines if the graph is biconnected (2-connected). that is it does not contain a cut-vertex.static booleanGraphTests.isBipartite(Graph graph) Determines if a graph is bipartite, meaning that its vertices can be partitioned in two disjoint stable sets.static booleanGraphTests.isBridgeless(Graph graph) Determines if the graph is bridgeless, that is it does not contain any bridge.static booleanDetermines if a graph is chordal, meaning it does not contain an induced cycle of four or more vertices.static booleanChecks if the specified vertices represent a clique, meaning that the subgraph induced by them is complete.static booleanGraphTests.isConnected(Graph graph) Determines if a graph is connected, meaning that there exists a path between every pair of vertices.static booleanDetermines if a graph is cubic, meaning that all of its vertices have degree 3.static booleanGraphTests.isEulerian(Graph graph) Determines if a graph is Eulerian, that is it contains a circuit passing through all of its edges.static booleanDetermines if a graph is a forest, an undirected and acyclic graph.static booleanGraphTests.isOverfull(Graph graph) Checks if a graph is overfull, meaning its size is greater than the product of its maximum degree and half of its order floored:|E| > Δ(G) |V|/2, whereΔ(G)is the maximum degree of the graph.static booleanGraphUtils.isPartitionValid(Graph graph, List<? extends VertexCollection> subsets) Checks if a vertex partition is valid, meaning the subsets are disjoint and cover all vertices in the graph.static booleanDetermines if the graph is regular, that is a graph where each vertex has the same number of neighbors (degree).static booleanDetermines if the graph is k-regular, that is a graph where each vertex has exactly k neighbors.static booleanGraphTests.isStableSet(Graph graph, int[] vertices) Checks if the specified vertices represent a stable set, meaning that the subgraph induced by them is edgeless.static booleanDetermines if a graph is a tree, that is an undirected, connected and acyclic graph.static booleanGraphTests.isTriangleFree(Graph graph) Determines if a graph is triangle-free, that is no three distinct vertices form a triangle.static GraphPerforms the join operation on the specified graphs.static GraphGraphUtils.mapVertexNumbers(Graph graph, int[] vertices) Creates a new graph by mapping the vertex numbers in the input graph to the specified values, while preserving the edges.static GraphCreates a new graph by rotating the vertex numbers in the input graph by a specified distance, while preserving the edges.static GraphCreates a new graph by shuffling the vertex numbers in the input graph, while preserving the edges.static DigraphThe corresponding directed graph of an undirected graph G has all the vertices of G and a pair of symmetrical arcs for each edge of G.static NetworkCreates a network having the same vertices and edges as the specified graph.static NetworkCreates a network having the same vertices and edges as the specified graph.static GraphPerforms the union of the specified graph.static GraphBuilderGraphBuilder.verticesFrom(Graph graph) Creates a new graph having the same vertex numbers as the specified graph.static NetworkBuilderNetworkBuilder.verticesFrom(Graph graph) Creates a new network having the same vertex numbers as the specified graph.Method parameters in org.graph4j with type arguments of type GraphModifier and TypeMethodDescriptionstatic GraphGraphUtils.createIntersectionGraph(List<Graph> graphs, boolean vertexLabeled) Creates the intersection graph of the vertex sets of the specified graphs.An intersection graph is a graph where each vertex corresponds to a set, and there is an edge between two vertices if and only if the corresponding sets intersect.Constructors in org.graph4j with parameters of type GraphModifierConstructorDescriptionGraphAlgorithm(Graph graph) Constructs an algorithm which will be executed on the input graph.SimpleGraphAlgorithm(Graph graph) Creates a new instance of the algorithm.UndirectedGraphAlgorithm(Graph graph) Creates a new instance of the algorithm. -
Uses of Graph in org.graph4j.clique
Methods in org.graph4j.clique with parameters of type GraphModifier and TypeMethodDescriptionstatic CliqueIteratorCliqueIterator.getInstance(Graph graph) static MaximalCliqueIteratorMaximalCliqueIterator.getInstance(Graph graph) Constructors in org.graph4j.clique with parameters of type GraphModifierConstructorDescriptionBFSCliqueIterator(Graph graph) BFSCliqueIterator(Graph graph, int minSize, int maxSize) BoundedCliqueIterator(Graph graph, int minSize, int maxSize) Deprecated.BoundedCliqueIterator(Graph graph, int minSize, int maxSize, long timeout) Deprecated.BronKerboschCliqueFinder(Graph graph) Deprecated.BronKerboschCliqueIterator(Graph graph) BronKerboschCliqueIterator(Graph graph, boolean shuffle, boolean useAdjacencyMatrix) Using the adjacency matrix allows for a slightly faster execution of the algorithm, at the expense of using more memory.Not recommended for large sparse graphs.DFSCliqueIterator(Graph graph) DFSCliqueIterator(Graph graph, int minSize, int maxSize) DFSCliqueIterator(Graph graph, int minSize, int maxSize, long timeout) MaximalCliqueFinder(Graph graph) -
Uses of Graph in org.graph4j.coloring
Fields in org.graph4j.coloring declared as GraphMethods in org.graph4j.coloring that return GraphModifier and TypeMethodDescriptionColoring.getGraph()ColoringAlgorithm.getGraph()Returns the input graph.Methods in org.graph4j.coloring with parameters of type GraphModifier and TypeMethodDescriptionprotected BacktrackColoringBacktrackColoring.getInstance(Graph graph, long timeLimit) static ColoringAlgorithmColoringAlgorithm.getInstance(Graph graph) Returns the default implementation of this interface.protected abstract ColoringAlgorithmExactColoringBase.getInstance(Graph graph, long timeLimit) Constructors in org.graph4j.coloring with parameters of type GraphModifierConstructorDescriptionBacktrackColoring(Graph graph) BacktrackColoring(Graph graph, long timeLimit) BacktrackColoring(Graph graph, Coloring initialColoring) BacktrackColoring(Graph graph, Coloring initialColoring, long timeLimit) BacktrackColoringBase(Graph graph) BacktrackColoringBase(Graph graph, long timeLimit) BacktrackColoringBase(Graph graph, Coloring initialColoring) BacktrackColoringBase(Graph graph, Coloring initialColoring, long timeLimit) Creates an empty coloring - no vertex has a color assigned to it.Creates a vertex coloring using the colors in the given array: the color of the vertex with indexiin the graph iscolors[i].Creates a vertex coloring using the specified color classes: all the vertices in the i-th set of thecolorClasseslist are assigned colori.DSaturGreedyColoring(Graph graph) ExactColoringBase(Graph graph) ExactColoringBase(Graph graph, long timeLimit) ExactColoringBase(Graph graph, Coloring initialColoring) ExactColoringBase(Graph graph, Coloring coloring, long timeLimit) GreedyColoring(Graph graph) The vertices will be colored in the order of their graph indices.GreedyColoring(Graph graph, int[] vertexOrdering) Creates a greedy algorithm that will color the vertices of the graph in the specified order.GreedyColoring(Graph graph, int[] vertexOrdering, boolean validateOrdering) Creates a greedy algorithm that will color the vertices of the graph in the specified order.Validation of the ordering is optional.GreedyColoringBase(Graph graph) LargestDegreeFirstColoring(Graph graph) The vertices will be colored in decreasing order by their degree.RandomGreedyColoring(Graph graph) The vertices will be colored in a randomly chosen order.SmallestDegreeLastColoring(Graph graph) -
Uses of Graph in org.graph4j.coloring.bw
Methods in org.graph4j.coloring.bw with parameters of type GraphModifier and TypeMethodDescriptionprotected BacktrackBandwithColoringBacktrackBandwithColoring.getInstance(Graph graph, long timeLimit) static ColoringAlgorithmBandwithColoringAlgorithm.getInstance(Graph graph) Returns the default implementation of this interface.Constructors in org.graph4j.coloring.bw with parameters of type GraphModifierConstructorDescriptionBacktrackBandwithColoring(Graph graph) BacktrackBandwithColoring(Graph graph, long timeLimit) BacktrackBandwithColoring(Graph graph, Coloring initialColoring) BacktrackBandwithColoring(Graph graph, Coloring initialColoring, long timeLimit) GreedyBandwithColoring(Graph graph) -
Uses of Graph in org.graph4j.coloring.eq
Methods in org.graph4j.coloring.eq with parameters of type GraphModifier and TypeMethodDescriptionprotected BacktrackEquitableColoringBacktrackEquitableColoring.getInstance(Graph graph, long timeLimit) static ColoringAlgorithmEquitableColoringAlgorithm.getInstance(Graph graph) Returns the default implementation of this interface.Constructors in org.graph4j.coloring.eq with parameters of type GraphModifierConstructorDescriptionBacktrackEquitableColoring(Graph graph) BacktrackEquitableColoring(Graph graph, long timeLimit) BacktrackEquitableColoring(Graph graph, Coloring initialColoring) BacktrackEquitableColoring(Graph graph, Coloring initialColoring, long timeLimit) GreedyEquitableColoring(Graph graph) GreedyEquitableColoring(Graph graph, Coloring initialColoring) -
Uses of Graph in org.graph4j.connectivity
Methods in org.graph4j.connectivity that return GraphModifier and TypeMethodDescriptiondefault GraphBiconnectivityAlgorithm.computeBlockCutTree()A block-cut tree (also known as BC-tree) is a tree that represents the blocks and articulation points (cut vertices) of a graph.default GraphBiconnectivityAlgorithm.computeBlockGraph()The block graph has one vertex for each block, and an edge between two vertices whenever their corresponding blocks share a vertex (an articulation point).ConnectivityAlgorithm.getConnectedComponent(int v) Returns the connected component the specified vertex belongs to.Methods in org.graph4j.connectivity that return types with arguments of type GraphModifier and TypeMethodDescriptionConnectivityAlgorithm.getConnectedComponents()Returns the connected components of the graph.Methods in org.graph4j.connectivity with parameters of type GraphModifier and TypeMethodDescriptionstatic BiconnectivityAlgorithmBiconnectivityAlgorithm.getInstance(Graph graph) Returns the default implementation of this interface.Constructors in org.graph4j.connectivity with parameters of type GraphModifierConstructorDescriptionBridgeDetectionAlgorithm(Graph graph) ConnectivityAlgorithm(Graph graph) Creates an algorithm for analyzing the connectivity of a graph.EdgeConnectivityAlgorithm(Graph graph) Creates an algorithm for determining the edge connectivity of a graph.Creates an empty edge cut.Creates a new edge cut.Creates a new edge cut.StoerWagnerMinimumCut(Graph graph) Creates an algorithm for computing the minimum weighted cut.StoerWagnerMinimumCut(Graph graph, boolean ignoreWeights) Creates an algorithm for computing the minimum weighted/cardinality cut.StoerWagnerMinimumCut1(Graph graph) Creates an algorithm for computing the minimum weighted cut.StoerWagnerMinimumCut1(Graph graph, boolean ignoreWeights) Creates an algorithm for computing the minimum weighted/cardinality cut.StoerWagnerMinimumCut2(Graph graph) Creates an algorithm for computing the minimum weighted cut.StoerWagnerMinimumCut2(Graph graph, boolean ignoreWeights) Creates an algorithm for computing the minimum weighted/cardinality cut.StoerWagnerMinimumCut3(Graph graph) Creates an algorithm for computing the minimum weighted cut.StoerWagnerMinimumCut3(Graph graph, boolean ignoreWeights) Creates an algorithm for computing the minimum weighted/cardinality cut.TarjanBiconnectivity(Graph graph) VertexConnectivityAlgorithm(Graph graph) Creates an algorithm for determining the vertex connectivity of a graph. -
Uses of Graph in org.graph4j.converters
Methods in org.graph4j.converters that return GraphModifier and TypeMethodDescriptionPruferTreeDecoder.createTree()Decodes a Prufer sequence to a tree.Constructors in org.graph4j.converters with parameters of type Graph -
Uses of Graph in org.graph4j.eulerian
Methods in org.graph4j.eulerian with parameters of type GraphModifier and TypeMethodDescriptionstatic EulerianCircuitAlgorithmEulerianCircuitAlgorithm.getInstance(Graph graph) Returns the default implementation of the algorithm.Constructors in org.graph4j.eulerian with parameters of type GraphModifierConstructorDescriptionHierholzerEulerianCircuit(Graph graph) HierholzerEulerianTrail(Graph graph) -
Uses of Graph in org.graph4j.generators
Methods in org.graph4j.generators that return GraphModifier and TypeMethodDescriptionstatic GraphGraphGenerator.complete(int numVertices) Generates a complete graph.static GraphGraphGenerator.completeBipartite(int n1, int n2) Generates a complete bipartite graph.static GraphGraphGenerator.completeMultipartite(int... numVertices) Generates a complete multipartite graph.static GraphGraphGenerator.completeTree(int numLevels, int degree) Generates a complete tree.CompleteMultipartiteGenerator.create()Creates a complete multipartite graph.CompleteTreeGenerator.create()FanGenerator.create()Creates a fan graph by performing the union of the empty graph and the path graph.KingGraphGenerator.create()Vertices are numbered from left to right and from top to bottom.MycielskiGenerator.create(int chromaticNumber) Creates a Mycielski graph with the specified chromatic number.RandomMultipartiteGenerator.create()Creates a random multipartite graph.RandomGnmGraphGenerator.createConnectedGraph()RandomForestGenerator.createForest()Creates a random forest.MycielskiGenerator.createFrom(Graph graph, int chromaticNumber) Creates a Mycielski graph starting from a specified graph.AbstractBipartiteGenerator.createGraph()BarabasiAlbertGenerator.createGraph()CompleteBipartiteGenerator.createGraph()CompleteGraphGenerator.createGraph()CycleGenerator.createGraph()GridGenerator.createGraph()Vertices are numbered from left to right and from top to bottom.PathGenerator.createGraph()RandomChordalGraphGenerator.createGraph()Creates a random chordal graph.RandomGnmGraphGenerator.createGraph()RandomGnpGraphGenerator.createGraph()RandomHamiltonianGenerator.createGraph()RandomKNNGenerator.createGraph()RandomLayeredGenerator.createGraph()RandomOreGraphGenerator.createGraph()RandomUnitDiskGenerator.createGraph()Creates a random unit disk graph.RegularGraphGenerator.createGraph()StarGenerator.createGraph()WattsStrogatzGenerator.createGraph()WheelGenerator.createGraph()Creates a wheel graph.RandomTreeGenerator.createTree()Creates a random tree.static GraphGraphGenerator.cycle(int numVertices) Generates a random cycle graph.static GraphGraphGenerator.empty(int numVertices) Creates a graph with a specified number of vertices and no edges.static GraphGraphGenerator.fan(int m, int n) Generates a fan graph (a join between an empty graph and a path).FanGenerator.getEmptyGraph()Returns the empty graph used to create the fan.FanGenerator.getPathGraph()Returns the path graph used to create the fan.static GraphGraphGenerator.grid(int rows, int cols) Generates a grid graph.static GraphGraphGenerator.mycielski(int chromaticNumber) Generates a Mycielski graph with the specified chromatic number.static GraphGraphGenerator.path(int numVertices) Generates a random path graph.static GraphGraphGenerator.randomChordalGraph(int numVertices) Generates a random chordal graph.static GraphGraphGenerator.randomForest(int numVertices) Generates a random forest.static GraphGraphGenerator.randomGnm(int numVertices, int numEdges) Generates a random G(n,m) graph.static GraphGraphGenerator.randomGnmBipartite(int n1, int n2, int m) Generates a random Gnm bipartite graph.static GraphGraphGenerator.randomGnp(int numVertices, double edgeProbability) Generates a random G(n,p) graph.static GraphGraphGenerator.randomGnpBipartite(int n1, int n2, double edgeProbability) Generates a random G(n,p) bipartite graph.static GraphGraphGenerator.randomTree(int numVertices) Generates a random tree.static GraphGraphGenerator.regular(int numVertices, int degree) Generates a regular graph.static GraphGraphGenerator.star(int numVertices) Generates a random star graph.static GraphGraphGenerator.trivial(int vertexNumber) Creates a graph with a single vertex having the specified number.static GraphGraphGenerator.wheel(int numVertices) Generates a random wheel graph.Methods in org.graph4j.generators with parameters of type GraphModifier and TypeMethodDescriptionprotected abstract voidprotected voidprotected voidprotected voidprotected voidAbstractGraphGenerator.addRandomEdges(Graph g, double edgeProbability) static voidEdgeWeightsGenerator.consecutiveIntegers(Graph graph) Each edge will receive a distinct weight, between0andnumEdges - 1.MycielskiGenerator.createFrom(Graph graph, int chromaticNumber) Creates a Mycielski graph starting from a specified graph.static voidstatic voidstatic voidEdgeWeightsGenerator.randomDoubles(Graph graph, double min, double max) static voidVertexWeightsGenerator.randomDoubles(Graph graph, double min, double max) static voidEdgeWeightsGenerator.randomIntegers(Graph graph, int min, int max) static voidVertexWeightsGenerator.randomIntegers(Graph graph, int min, int max) Constructors in org.graph4j.generators with parameters of type GraphModifierConstructorDescriptionBarabasiAlbertGenerator(Graph initialGraph, int edgesPerVertex, int numVertices) EdgeDataGenerator(Graph graph, int dataType) Creates a generator for setting random or specific values on the edges of a graph.The data type of the values may beGraph.WEIGHT,Network.CAPACITY,Network.COSTor user defined. -
Uses of Graph in org.graph4j.hamiltonian
Methods in org.graph4j.hamiltonian with parameters of type GraphModifier and TypeMethodDescriptionstatic HamiltonianCycleAlgorithmHamiltonianCycleAlgorithm.getInstance(Graph graph) static HamiltonianPathAlgorithmHamiltonianPathAlgorithm.getInstance(Graph graph) Constructors in org.graph4j.hamiltonian with parameters of type Graph -
Uses of Graph in org.graph4j.io
Methods in org.graph4j.io that return Graph -
Uses of Graph in org.graph4j.isomorphism
Methods in org.graph4j.isomorphism that return GraphModifier and TypeMethodDescriptionTreeIsomorphism.getTree1()The first tree.TreeIsomorphism.getTree2()The second tree.Methods in org.graph4j.isomorphism with parameters of type GraphModifier and TypeMethodDescriptiondefault booleanIsomorphismAlgorithm.checkTrivialConditions(Graph graph1, Graph graph2) Performs some trivial checks in order to determine if two graphs may be isomorphic.Constructors in org.graph4j.isomorphism with parameters of type GraphModifierConstructorDescriptionAbstractGraphIsomorphism(Graph g1, Graph g2) AbstractGraphIsomorphism(Graph g1, Graph g2, boolean cache) Constructor for the AbstractGraphIsomorphism class.ForestIsomorphism(Graph forest1, Graph forest2) Constructor for the forest isomorphism algorithm.Isomorphism(Graph graph1, Graph graph2, int[] mapping, int[] inverse) Creates an isomorphism between two graphs.RootedForestIsomorphism(Graph forest1, Graph forest2, VertexSet roots1, VertexSet roots2) Constructor for the rooted forest isomorphism algorithm.RootedTreeIsomorphism(Graph tree1, Graph tree2, int root1, int root2) Constructor for the rooted tree isomorphism algorithm.TreeIsomorphism(Graph tree1, Graph tree2) Constructor for the tree isomorphism algorithm.UllmanExactGraphIsomorphism(Graph g1, Graph g2) UllmanExactGraphIsomorphism(Graph g1, Graph g2, boolean cache) UllmanSubGraphIsomorphism(Graph g1, Graph g2) UllmanSubGraphIsomorphism(Graph g1, Graph g2, boolean cache) VF2ExactGraphIsomorphism(Graph g1, Graph g2) VF2ExactGraphIsomorphism(Graph g1, Graph g2, boolean cache) VF2SubGraphIsomorphism(Graph g1, Graph g2) VF2SubGraphIsomorphism(Graph g1, Graph g2, boolean cache) -
Uses of Graph in org.graph4j.matching
Methods in org.graph4j.matching that return GraphConstructors in org.graph4j.matching with parameters of type GraphModifierConstructorDescriptionEdmondsMaximumMatching(Graph graph) GreedyWeightedMatching(Graph graph) Creates a maximal weighted matching algorithm that iterates over the edges of the graph in the descending order given by their normalized weight.GreedyWeightedMatching(Graph graph, boolean normalized) Creates a maximal weighted matching algorithm that iterates over the edges of the graph in the descending order given by theier wight or normalized weight.GreedyWeightedMatching(Graph graph, Comparator<Edge> comparator) Creates a maximal matching algorithm that iterates over the edges of the graph in the order given by a specified comparator.HopcroftKarpMaximumMatching(Graph graph) Creates an algorithm for determining a maximum matching in a bipartite graph.HopcroftKarpMaximumMatching(Graph graph, StableSet leftSide, StableSet rightSide) Creates an algorithm for determining a maximum matching in a bipartite graph.MaximalCardinalityMatching(Graph graph) Creates a maximal matching algorithm that iterates over the edges of the graph in the order given by the sum of degrees of the edges endpoints.This method has O(m + m log n) time complexity and produces, in general, better results than the random version.MaximalCardinalityMatching(Graph graph, boolean random) Creates a maximal matching algorithm that iterates over the edges of the graph in a random order(random=true)or in the order in which the edges are internally stored(random=false).This method has O(m) time complexity.MaximalCardinalityMatching(Graph graph, Comparator<Edge> comparator) Creates a maximal matching algorithm that iterates over the edges of the graph in the order given by a specified comparator.This method has O(m + m log n) time complexity. -
Uses of Graph in org.graph4j.measures
Methods in org.graph4j.measures with parameters of type GraphModifier and TypeMethodDescriptionstatic doublestatic double[]GraphMeasures.degreeDistribution(Graph graph) The degree distribution is the probability distribution P of the graph degrees over the whole graph.static int[]GraphMeasures.degreeHistogram(Graph graph) The degree histogram counts how many vertices have a specific degree in the graph.static doublestatic intstatic intGraphMeasures.maxDegreeVertex(Graph graph) static intDetermines the minimum degree of the vertices.static intGraphMeasures.minDegreeVertex(Graph graph) Determines a vertex with minimum degree.static longGraphMeasures.numberOfTriangles(Graph graph) A triangle is formed by three distinct vertices connected all with each other.static longGraphMeasures.numberOfTriplets(Graph graph) A triplet is formed by three distinct vertices that are connected by either two (open triplet) or three (closed triplet) undirected edges.Constructors in org.graph4j.measures with parameters of type Graph -
Uses of Graph in org.graph4j.metrics
Constructors in org.graph4j.metrics with parameters of type GraphModifierConstructorDescriptionGraphMetrics(Graph graph) TreeExtremaCalculator(Graph graph) TreeExtremaCalculator(Graph graph, int startVertex) TreeMetrics(Graph graph) -
Uses of Graph in org.graph4j.ordering
Methods in org.graph4j.ordering with parameters of type GraphModifier and TypeMethodDescriptionstatic int[]VertexOrderings.breadthFirst(Graph graph, int startVertex) Creates an array containing the vertices of the graph in the order produced by a BFS (Breadth First Search) traversal.static int[]VertexOrderings.depthFirst(Graph graph, int startVertex) Creates an array containing the vertices of the graph in the order produced by a DFS (Depth First Search) traversal.static int[]VertexOrderings.largestDegreeFirst(Graph graph) Creates an array containing the vertices of the graph in decreasing order by their degree.static int[]Creates an array containing the vertices of the graph in the order produced by the Lexicographic Breadth-First Search algorithm.static int[]VertexOrderings.maximumCardinality(Graph graph) Creates an array containing the vertices of the graph in the order produced by the Maximum Cardinality Search (MCS) algorithm.static int[]VertexOrderings.smallestDegreeFirst(Graph graph) Creates an array containing the vertices of the graph in increasing order by their degree.static int[]VertexOrderings.smallestDegreeLast(Graph graph) Computes the vertex ordering from the end to the beginning: at each step, the node of minimum degree in the current graph is selected and then it is removed from the graph.Constructors in org.graph4j.ordering with parameters of type GraphModifierConstructorDescriptionAcyclicOrientation(Graph graph) AcyclicOrientation(Graph graph, int[] vertexOrdering) SmallestDegreeLastOrdering(Graph graph) -
Uses of Graph in org.graph4j.realization
Methods in org.graph4j.realization that return GraphModifier and TypeMethodDescriptionBipartiteRealizationAlgorithm.getGraph()Creates a bipartite graph with the specified degree sequence.GraphRealizationAlgorithm.getGraph()Creates a graph with the specified degree sequence.HavelHakimiBipartiteRealization.getGraph()HavelHakimiGraphRealization.getGraph() -
Uses of Graph in org.graph4j.route
Methods in org.graph4j.route with parameters of type GraphModifier and TypeMethodDescriptionPathFinder.findShortestPath(Graph graph, int v, int u, int[] forbiddenVertices) Finds the path with the fewest edges connecting two vertices.Constructors in org.graph4j.route with parameters of type GraphModifierConstructorDescriptionCycleFinder(Graph graph) MaximumInducedPath(Graph graph) PathFinder(Graph graph) -
Uses of Graph in org.graph4j.shortestpath
Methods in org.graph4j.shortestpath that return GraphModifier and TypeMethodDescriptionAllPairsShortestPath.getGraph()Returns the input graph on which the algorithm is executed.SinglePairShortestPath.getGraph()Returns the input graph on which the algorithm is executed.SingleSourceShortestPath.getGraph()Methods in org.graph4j.shortestpath with parameters of type GraphModifier and TypeMethodDescriptionstatic AllPairsShortestPathAllPairsShortestPath.getInstance(Graph graph) Returns the default implementation of this interface.static SinglePairShortestPathSinglePairShortestPath.getInstance(Graph graph, int source, int target) Returns the default implementation of this interface.static SingleSourceShortestPathSingleSourceShortestPath.getInstance(Graph graph, int source) Returns the default implementation of this interface.Constructors in org.graph4j.shortestpath with parameters of type GraphModifierConstructorDescriptionAStarAlgorithm(Graph graph, int source, int target, AStarEstimator heuristic) Creates an algorithm to find the shortest path between source and target.BellmanFordShortestPath(Graph graph, int source) Creates an algorithm to find all shortest paths starting in the source.BFSAllPairsShortestPath(Graph graph) Creates an algorithm for finding all pair shortest paths in an unweighted graph.BFSSinglePairShortestPath(Graph graph, int source, int target) Creates an algorithm to find the path with the fewest edges between two specified vertices.BFSSinglePairShortestPath(Graph graph, int source, int target, int[] forbiddenVertices) Creates an algorithm to find the path with the fewest edges between two specified vertices, not passing through some forbidden vertices.BFSSingleSourceShortestPath(Graph graph, int source) Creates an algorithm to find all shortest paths starting in the specified source, in an unweighted graph.BidirectionalDijkstra(Graph graph, int source, int target) Creates an algorithm to find the shortest path between source and target.DijkstraShortestPathBase(Graph graph, int source) Creates an algorithm to find all shortest paths starting in the source.DijkstraShortestPathDefault(Graph graph, int source) DijkstraShortestPathHeap(Graph graph, int source) FloydWarshallShortestPath(Graph graph) JohnsonShortestPath(Graph graph) -
Uses of Graph in org.graph4j.spanning
Fields in org.graph4j.spanning declared as GraphModifier and TypeFieldDescriptionprotected final GraphWeightedSpanningTreeIterator.graphprotected GraphMinimumSpanningTreeBase.treeMethods in org.graph4j.spanning that return GraphModifier and TypeMethodDescriptionMinimumSpanningTreeAlgorithm.getTree()If the graph is disconnected, this is actually a spanning forest.MinimumSpanningTreeBase.getTree()ParallelFilterKruskal.getTree()Methods in org.graph4j.spanning with parameters of type GraphModifier and TypeMethodDescriptionstatic MinimumSpanningTreeAlgorithmMinimumSpanningTreeAlgorithm.getInstance(Graph graph) Constructors in org.graph4j.spanning with parameters of type GraphModifierConstructorDescriptionBoruvkaMinimumSpanningTreeParallel(Graph graph, int nrThreads) KruskalMinimumSpanningTree(Graph graph) MinimumSpanningTreeBase(Graph graph) MinimumSpanningTreeIterator(Graph graph) Creates an iterator over the minimum spanning trees of a weighted graph.ParallelFilterKruskal(Graph graph) PrimMinimumSpanningTree(Graph graph) SpanningTreeIterator(Graph graph) Creates an iterator over the spanning trees of a graph.Creates an iterator over the spanning trees of the specified graph, in ascending order of their weight.WeightedSpanningTreeIterator(Graph graph, boolean ascending) Creates an iterator over the spanning trees of the specified graph, in ascending or descending order by their weight. -
Uses of Graph in org.graph4j.support
Constructors in org.graph4j.support with parameters of type GraphModifierConstructorDescriptionBipartiteGraphSupport(Graph graph) Creates an instance of the support class.ChordalGraphSupport(Graph graph) Creates an instance of the support class. -
Uses of Graph in org.graph4j.traversal
Constructors in org.graph4j.traversal with parameters of type GraphModifierConstructorDescriptionBFSIterator(Graph graph) Creates an iterator starting with the first vertex of the graph (the one at index 0)BFSIterator(Graph graph, int start) Creates an iterator starting with the specified vertex.BFSIterator(Graph graph, int start, int[] forbiddenVertices, boolean reverse) Creates an iterator starting with the specified vertex, traversing a directed graph either in the direction of the arcs, or in reversed direction.BFSTraverser(Graph graph) DFSIterator(Graph graph) DFSIterator(Graph graph, int start) DFSTraverser(Graph graph) LexBFSIterator(Graph graph) Creates an iterator starting with the first vertex of the graph (the one at index 0)LexBFSIterator(Graph graph, int start) Creates an iterator starting with the specified vertex.LexBFSIteratorInt(Graph graph) Deprecated.Creates an iterator starting with the first vertex of the graph (the one at index 0)LexBFSIteratorInt(Graph graph, int start) Deprecated.Creates an iterator starting with the specified vertex.MaximumCardinalityIterator(Graph graph) Creates an iterator starting with the first vertex of the graph (the one at index 0)MaximumCardinalityIterator(Graph graph, int start) Creates an iterator starting with the specified vertex. -
Uses of Graph in org.graph4j.util
Fields in org.graph4j.util declared as GraphModifier and TypeFieldDescriptionprotected final GraphEdgeArray.graphDeprecated.protected GraphEdgeSet.graphprotected GraphVertexCollection.graphMethods in org.graph4j.util that return GraphModifier and TypeMethodDescriptionVertexCollection.getGraph()RootedTree.tree()Returns the tree.Methods in org.graph4j.util with parameters of type GraphModifier and TypeMethodDescriptionstatic voidValidator.checkVertexIndex(Graph graph, int index) Checks if a specified integer is a valid index in a graph, i.e. it is in the range0tograph.numVertices()-1.static voidValidator.checkVertexOrdering(Graph graph, int[] ordering) Checks if a specified ordering is valid, meaning it is a permutation of the vertices of the graph.static voidValidator.containsEdge(Graph graph, int v, int u) Checks if a graph contains an edge.static voidValidator.containsEdge(Graph graph, Edge e) Checks if a graph contains an edge.static voidValidator.containsVertex(Graph graph, int v) Checks if a graph contains a vertex.static voidValidator.containsVertices(Graph graph, int... vertices) Checks if a graph contains an array of vertices.static voidValidator.haveDisjointVertices(Graph g1, Graph g2) Checks if the vertex sets of two graphs are disjoint.static voidValidator.requireNonEmpty(Graph graph) Checks that the specified graph is not empty.static voidValidator.requireSimple(Graph graph) Checks if a graph is simple, i.e. undirected, does not allow multiple edges and does not allow self loops.static voidValidator.requireUndirected(Graph graph) Checks if a graph is undirected.Constructors in org.graph4j.util with parameters of type GraphModifierConstructorDescriptionDeprecated.Deprecated.Deprecated.Deprecated.Constructs a new, empty set of edges.Constructs a new, empty set of edges, with a specified initial capacity.EdgeSet(Graph graph, Collection<Edge> edges) Constructs a new set containing the elements in the specified collection.Constructs a new set containing the elements in the specified array.RootedTree(Graph tree, int root) Creates a rooted tree.VertexCollection(Graph graph) VertexCollection(Graph graph, int initialCapacity) VertexCollection(Graph graph, int[] vertices) VertexHeap(Graph graph, boolean addAll, IntComparator comparator) VertexHeap(Graph graph, IntComparator comparator) VertexList(Graph graph) VertexList(Graph graph, int initialCapacity) VertexList(Graph graph, int[] vertices) VertexPartition(Graph graph) Deprecated.Creates a partition of the vertices of the specified graph.VertexQueue(Graph graph) VertexQueue(Graph graph, int initialCapacity) VertexQueue(Graph graph, int[] vertices) VertexStack(Graph graph) VertexStack(Graph graph, int initialCapacity) -
Uses of Graph in org.graph4j.vsp
Methods in org.graph4j.vsp that return GraphMethods in org.graph4j.vsp with parameters of type GraphModifier and TypeMethodDescriptionstatic VertexSeparatorAlgorithmVertexSeparatorAlgorithm.getInstance(Graph graph) Returns the default implementation of this interface.Constructors in org.graph4j.vsp with parameters of type GraphModifierConstructorDescriptionBacktrackVertexSeparator(Graph graph) BacktrackVertexSeparator(Graph graph, int maxShoreSize) GreedyVertexSeparator(Graph graph) GreedyVertexSeparator(Graph graph, int maxShoreSize) VertexSeparator(Graph graph) The default maximum shore size is2n/3, wherenis the number of vertices in the graph.VertexSeparator(Graph graph, int maxShoreSize) VertexSeparatorBase(Graph graph) Creates an algorithm for computing a vertex separator with the default argument for the maximum shore size of2n/3, wherenis the number of vertices in the graph.VertexSeparatorBase(Graph graph, int maxShoreSize) Creates an algorithm for computing a vertex separator with the specified maximum shore size.