|
@@ -20,6 +20,7 @@ public class GraphController {
|
|
|
|
|
|
|
|
@PostMapping(value = "/graph/get-breath-first-traversal")
|
|
@PostMapping(value = "/graph/get-breath-first-traversal")
|
|
|
public Response getGraphBreadthFirstTraversal(@RequestBody UDUWGraph graph,@RequestParam int startVertex){
|
|
public Response getGraphBreadthFirstTraversal(@RequestBody UDUWGraph graph,@RequestParam int startVertex){
|
|
|
|
|
+ System.out.println("==================get-breadth-first-traversal=========================");
|
|
|
GraphTraversalVO vo=graphService.getBreadthFirstTraversal(graph,startVertex);
|
|
GraphTraversalVO vo=graphService.getBreadthFirstTraversal(graph,startVertex);
|
|
|
System.out.println(vo.toString());
|
|
System.out.println(vo.toString());
|
|
|
return Response.buildSuccess(vo);
|
|
return Response.buildSuccess(vo);
|
|
@@ -27,24 +28,28 @@ public class GraphController {
|
|
|
|
|
|
|
|
@PostMapping(value = "/graph/get-depth-first-traversal")
|
|
@PostMapping(value = "/graph/get-depth-first-traversal")
|
|
|
public Response getGraphDepthFirstTraversal(@RequestBody UDUWGraph graph,@RequestParam int startVertex){
|
|
public Response getGraphDepthFirstTraversal(@RequestBody UDUWGraph graph,@RequestParam int startVertex){
|
|
|
|
|
+ System.out.println("==================get-depth-first-traversal=========================");
|
|
|
GraphTraversalVO vo=graphService.getDepthFirstTraversal(graph,startVertex);
|
|
GraphTraversalVO vo=graphService.getDepthFirstTraversal(graph,startVertex);
|
|
|
return Response.buildSuccess(vo);
|
|
return Response.buildSuccess(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping(value = "/graph/get-prim-minimum-spanning-tree")
|
|
@PostMapping(value = "/graph/get-prim-minimum-spanning-tree")
|
|
|
public Response getPrimMinimumSpanningTree(@RequestBody UDWGraph graph,@RequestParam int startVertex){
|
|
public Response getPrimMinimumSpanningTree(@RequestBody UDWGraph graph,@RequestParam int startVertex){
|
|
|
|
|
+ System.out.println("==================get-prim-minimum-spanning-tree=========================");
|
|
|
PrimMinimumSpanningTree vo=graphService.getPrimMinimumSpanningTree(graph,startVertex);
|
|
PrimMinimumSpanningTree vo=graphService.getPrimMinimumSpanningTree(graph,startVertex);
|
|
|
return Response.buildSuccess(vo);
|
|
return Response.buildSuccess(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping(value = "/graph/get-new-UDUWGraph")
|
|
@GetMapping(value = "/graph/get-new-UDUWGraph")
|
|
|
public Response getNewUDUWGraph(){
|
|
public Response getNewUDUWGraph(){
|
|
|
|
|
+ System.out.println("==================new UDUWGraph=========================");
|
|
|
UDUWGraph vo=graphService.getNewUDUWGraph();
|
|
UDUWGraph vo=graphService.getNewUDUWGraph();
|
|
|
return Response.buildSuccess(vo);
|
|
return Response.buildSuccess(vo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping(value = "/graph/get-new-UDWGraph")
|
|
@GetMapping(value = "/graph/get-new-UDWGraph")
|
|
|
public Response getNewUDWGraph(){
|
|
public Response getNewUDWGraph(){
|
|
|
|
|
+ System.out.println("==================new UDWGraph=========================");
|
|
|
UDWGraph vo=graphService.getNewUDWGraph();
|
|
UDWGraph vo=graphService.getNewUDWGraph();
|
|
|
return Response.buildSuccess(vo);
|
|
return Response.buildSuccess(vo);
|
|
|
}
|
|
}
|