Package lt.refactory.primsAlgo.service

Examples of lt.refactory.primsAlgo.service.PrimsController


    nodeList.add(new Node(BigDecimal.valueOf(5), BigDecimal.valueOf(1)));
   
    Graph<Edge> graph = Graph.<Edge>fullGraphFactory(nodeList);
    Graph<WeightedEdge> weightedGraph = SteinersAlgorithm.getWeightedGraph(graph);

    PrimsController controller = new PrimsController(weightedGraph);
    weightedGraph = controller.getSmallestTreeWithOnePoint(weightedGraph);
   
    Node steinersPoint = weightedGraph.getSteinersPoint();
   
    assertTrue(steinersPoint != null);
    assertTrue(steinersPoint.getPointX().compareTo(BigDecimal.valueOf(1.6)) == 1);
View Full Code Here


    nodeList.add(new Node(BigDecimal.valueOf(6), BigDecimal.valueOf(3)));
   
    Graph<Edge> graph = Graph.<Edge>fullGraphFactory(nodeList);
    Graph<WeightedEdge> weightedGraph = SteinersAlgorithm.getWeightedGraph(graph);

    PrimsController controller = new PrimsController(weightedGraph);
    weightedGraph = controller.getSmallestTreeWithOnePoint(weightedGraph);
   
    Node steinersPoint = weightedGraph.getSteinersPoint();
   
    assertTrue(steinersPoint != null);
    assertTrue(steinersPoint.getPointX().compareTo(BigDecimal.valueOf(2.1)) == 1);
View Full Code Here

    nodeList.add(new Node(BigDecimal.valueOf(8), BigDecimal.valueOf(9)));
   
    Graph<Edge> graph = Graph.<Edge>fullGraphFactory(nodeList);
    Graph<WeightedEdge> weightedGraph = SteinersAlgorithm.getWeightedGraph(graph);

    PrimsController controller = new PrimsController(weightedGraph);
    weightedGraph = controller.getSmallestTreeWithOnePoint(weightedGraph);
   
    Node steinersPoint = weightedGraph.getSteinersPoint();
   
    assertTrue(steinersPoint != null);
    assertTrue(steinersPoint.getPointX().compareTo(BigDecimal.valueOf(2.1)) == 1);
View Full Code Here

    } catch (FileNotFoundException | URISyntaxException e) {
      e.printStackTrace();
    }
       
    graph = new Graph<WeightedEdge>();
    controller = new PrimsController(graph);
    fileController = new FileController(controller);
   
   
   
        initComponents();
View Full Code Here

 
  /** Creates new form GraphPanel
    */
  public GraphPanel() {
    graph = new Graph<WeightedEdge>();
    controller = new PrimsController(graph);
    fileController = new FileController(controller);
    initComponents();
  }
View Full Code Here

    } catch (FileNotFoundException | URISyntaxException e) {
      e.printStackTrace();
    }
       
    graph = new Graph<WeightedEdge>();
    controller = new PrimsController(graph);
    fileController = new FileController(controller);
   
   
   
        initComponents();
View Full Code Here

TOP

Related Classes of lt.refactory.primsAlgo.service.PrimsController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.