Package com.jgalgo
Interface ChinesePostman
-
public interface ChinesePostman
An algorithm for the chinese postman problem.The chinese postman problem is to find a closed path that visits all edges in the graph at least once, with minimum weight sum with respect to a given edge weight function.
The problem can be solved in polynomial time.
- Author:
- Barak Ugav
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ChinesePostman.Builder
A builder forChinesePostman
objects.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Path
computeShortestEdgeVisitorCircle(Graph g, WeightFunction w)
Compute the shortest circuit that visits all edges in the graph at least once.static ChinesePostman.Builder
newBuilder()
Create a new builder for chinese postman algorithms.
-
-
-
Method Detail
-
computeShortestEdgeVisitorCircle
Path computeShortestEdgeVisitorCircle(Graph g, WeightFunction w)
Compute the shortest circuit that visits all edges in the graph at least once.- Parameters:
g
- a graphw
- an edge weight function- Returns:
- a closed path that visits all edges in the graph, with minimum weight sum with respect to the given edge weight function
-
newBuilder
static ChinesePostman.Builder newBuilder()
Create a new builder for chinese postman algorithms.This is the recommended way to instantiate a new
ChinesePostman
object.- Returns:
- a new builder that can build
ChinesePostman
objects
-
-