Uses of Class
calculation.Vertex

Packages that use Vertex
airspace Provides classes for handling the planes. 
calculation Provides classes for handling the graph and the calculation of the arrival tree. 
general Provides classes for handling some general data that all packages need. 
graphics Provides classes for showing the graphics. 
 

Uses of Vertex in airspace
 

Methods in airspace with parameters of type Vertex
 double Plane.distanceTo(Vertex other)
          Calculates distance between Plane and given Vertex.
 

Uses of Vertex in calculation
 

Fields in calculation declared as Vertex
private  Vertex[] Vertex.adj
          Adjacent vertices.
private  Vertex Graph.airportVertex
          Vertex acting as airport.
private  Vertex[][] Graph.graph
          graph matrix has a point (0,0) at left bottom corner.
private  Vertex Graph.nullVertex
          Vertex to be null.
private  Vertex Vertex.parent
          Parent vertex in a tree aStar is creating.
private  Vertex TreeNode.vertex
          Vertex this node represents.
 

Fields in calculation with type parameters of type Vertex
private  java.util.ArrayList<Vertex> BuildTree.mergePoints
          Merge points of the arrival tree for airplanes.
private  java.util.ArrayList<Vertex> Tree.vertexTree
          Vertexes of the tree.
 

Methods in calculation that return Vertex
 Vertex[][] Graph.createGraph(int width, int height)
          A graph creation method.
 Vertex Vertex.getAdjacent(int direction)
          Returns the adjacent Vertex of this Vertex in a certain direction.
 Vertex[] Vertex.getAdjacents()
          This method is used as a handle to the list of adjacent vertices.
 Vertex Graph.getAirport()
          Return Airport vertex.
 Vertex[][] Graph.getGraph()
          Returns the current graph.
 Vertex Vertex.getParent()
          Returns the parent of this Vertex.
 Vertex TreeNode.getVertex()
          Returns this.vertex.
 

Methods in calculation that return types with arguments of type Vertex
 java.util.ArrayList<Vertex> BuildTree.aStar(Vertex start, Vertex goal)
          Calculates an optimal path between two given vertices of a graph.
private  java.util.ArrayList<Vertex> BuildTree.calculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          Finds out the shortest path from startNode to all Vertexes in endNodes using method aStar.
 java.util.ArrayList<Vertex> BuildTree.getCalculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          For testing.
 java.util.ArrayList<Vertex> BuildTree.getHalfTable(java.util.ArrayList<Vertex> endNodes, boolean side)
          For testing.
 java.util.ArrayList<Vertex> Graph.getOuterArc()
          Returns ArcPoints of outermost arc.
 java.util.ArrayList<Vertex> Tree.getVertexLeaves()
          Returns the leaves of a tree (=every node without children) as an ArrayList of Vertexes.
 java.util.ArrayList<Vertex> Tree.getVertexTree()
          Returns this.treeNodes as arrayList of Vertexes.
private  java.util.ArrayList<Vertex> BuildTree.halfTable(java.util.ArrayList<Vertex> endNodes, boolean side)
          Takes half of the ArrayList given in parameters and returns it.
private  java.util.ArrayList<Vertex> BuildTree.resultPath(Vertex start, Vertex goal, java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Creates the resulting path for aStar method.
 

Methods in calculation with parameters of type Vertex
 java.util.ArrayList<Vertex> BuildTree.aStar(Vertex start, Vertex goal)
          Calculates an optimal path between two given vertices of a graph.
 double Vertex.calculateDir(Vertex goal)
          Calculates the angle between this and a certain Vertex.
 double Vertex.calculateDirCost(Vertex dirStart, double rightDir)
          Compares the given double value with the direction from a given Vertex to this vertex.
private  java.util.ArrayList<Vertex> BuildTree.calculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          Finds out the shortest path from startNode to all Vertexes in endNodes using method aStar.
 int Vertex.compareTo(Vertex other)
          Comparable interface needs this to find out which vertex is "better" for aStar method.
 double Vertex.distanceTo(Vertex other)
          Calculates the straight line distance to other vertex in the graph.
 int Vertex.getAdjacentNumber(Vertex vertex)
          Returns the integer direction of follower vertex given in parameters.
 java.util.ArrayList<Vertex> BuildTree.getCalculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          For testing.
 void BuildTree.getSetSafetyDistance(Vertex vertex, boolean availability, int distance, boolean set)
          For testing.
 void BuildTree.getSetSlidingSafetyDistance(Vertex startNode, boolean sliding, boolean availability)
          For testing.
 void BuildTree.getTreeRecursion(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          For testing.
 double Vertex.graphDistanceTo(Vertex other)
          Calculates the distance to other vertex in a Graph.
 boolean Graph.graphUpdate(int scale, int[][] matrix, Vertex[][] graph, int safety)
          This method updates the graph, by the weatherdata included in the matrix.
 boolean Graph.resetGraph(Vertex[][] net)
          Resets the graph.
private  java.util.ArrayList<Vertex> BuildTree.resultPath(Vertex start, Vertex goal, java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Creates the resulting path for aStar method.
 void Vertex.setAdjacent(int direction, Vertex other)
          Adds a vertex to the adjacent list.
 void Vertex.setDistCost(Vertex goal)
          Sets the distCost of this Vertex.
 void Vertex.setHCost(Vertex goal)
          Sets a new hCost to this Vertex.
 void Vertex.setParent(Vertex newParent)
          Sets a new parent to this Vertex.
private  void BuildTree.setSafetyDistance(Vertex vertex, boolean availability, int distance, boolean set)
          Makes or removes the safety distance around the node.
 void BuildTree.setSafetyDistanceAirPlanes(Vertex vertex, boolean availability, int distance)
          This method is similar that the method setSafetyDistance.
 void Graph.setSafezone(boolean state, Vertex node, int width)
          This method sets nodes around a storm not available, thus setting an unavailable perimeter around the bad weather.
private  void BuildTree.setSlidingSafetyDistance(Vertex startNode, boolean sliding, boolean availability)
          Sets a safety distance (true or false) to a certain area under the node, determined by value this.safetyDistance.
 void BuildTree.treeRecursion(Vertex parStartNode, java.util.ArrayList<Vertex> endNodeTable)
          The method which implements the recursion of the tree in calculation.
 

Method parameters in calculation with type arguments of type Vertex
 boolean Tree.addToTree(java.util.ArrayList<Vertex> path)
          Adds given path (list of Vertexes) to the tree.
private  java.util.ArrayList<Vertex> BuildTree.calculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          Finds out the shortest path from startNode to all Vertexes in endNodes using method aStar.
 java.util.ArrayList<Vertex> BuildTree.getCalculatePath(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          For testing.
 java.util.ArrayList<Vertex> BuildTree.getHalfTable(java.util.ArrayList<Vertex> endNodes, boolean side)
          For testing.
 int BuildTree.getTestSide(java.util.ArrayList<Vertex> path, java.util.ArrayList<Vertex> endNodes)
          For testing.
 int BuildTree.getTestSide(java.util.ArrayList<Vertex> path, java.util.ArrayList<Vertex> endNodes)
          For testing.
 void BuildTree.getTreeRecursion(Vertex startNode, java.util.ArrayList<Vertex> endNodes)
          For testing.
private  java.util.ArrayList<Vertex> BuildTree.halfTable(java.util.ArrayList<Vertex> endNodes, boolean side)
          Takes half of the ArrayList given in parameters and returns it.
 double BuildTree.pathLength(java.util.ArrayList<Vertex> path)
          Returns the length of path.
private  void BuildTree.resetVertices(java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Resets vertices which aStar used calling Vertex.reset() method for each Vertex whose fields were changed by aStar.
private  void BuildTree.resetVertices(java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Resets vertices which aStar used calling Vertex.reset() method for each Vertex whose fields were changed by aStar.
private  java.util.ArrayList<Vertex> BuildTree.resultPath(Vertex start, Vertex goal, java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Creates the resulting path for aStar method.
private  java.util.ArrayList<Vertex> BuildTree.resultPath(Vertex start, Vertex goal, java.util.PriorityQueue<Vertex> openSet, java.util.ArrayList<Vertex> closedSet)
          Creates the resulting path for aStar method.
 void Tree.setTreeMergePoints(java.util.ArrayList<Vertex> mergePoints)
          Sets this.treeMergePoints from parameter.
private  int BuildTree.testSide(java.util.ArrayList<Vertex> path, java.util.ArrayList<Vertex> endNodes)
          Tests if the end of the path went to left or right.
private  int BuildTree.testSide(java.util.ArrayList<Vertex> path, java.util.ArrayList<Vertex> endNodes)
          Tests if the end of the path went to left or right.
 java.util.ArrayList<TreeNode> Tree.treeNodePath(java.util.ArrayList<Vertex> path)
          Makes a path containing tree nodes from path containing vertexes by creating new treenodes corresponding to vertexes and adding them, in same order as in parameter path, to a new ArrayList.
 void BuildTree.treeRecursion(Vertex parStartNode, java.util.ArrayList<Vertex> endNodeTable)
          The method which implements the recursion of the tree in calculation.
 

Constructors in calculation with parameters of type Vertex
Graph(Vertex[][] gRaph)
          a Constructor for testing purposes only.
TreeNode(Vertex nodeId)
          Constructor.
Vertex(double lon, double lat, int x, int y, boolean available, Vertex nullVertex)
          Constructor.
 

Uses of Vertex in general
 

Fields in general declared as Vertex
private  Vertex[][] DataCollection.graph
          graph Current graph.
 

Methods in general that return Vertex
 Vertex[][] DataCollection.getGraph()
          Returns current graph.
 

Methods in general with parameters of type Vertex
 void DataCollection.setGraph(Vertex[][] graph)
          Set current graph.
 

Uses of Vertex in graphics
 

Methods in graphics with parameters of type Vertex
private  void GraphicsEngine.graphicsRenderAirport(java.awt.Graphics2D g2, Vertex root)
          Draw airport to offScreen image.