test_class.declarator: test3
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph test3;
test_class.type: HierarchyMapGraph
test_class.var_name: test3
test_class.declarator: test5
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph test5;
test_class.type: HierarchyMapGraph
test_class.var_name: test5
test_class.declarator: test8
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph test8;
test_class.type: HierarchyMapGraph
test_class.var_name: test8
test_class.declarator: testGraph1
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph testGraph1;
test_class.type: HierarchyMapGraph
test_class.var_name: testGraph1
test_class.declarator: testGraph2
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph testGraph2;
test_class.type: HierarchyMapGraph
test_class.var_name: testGraph2
test_class.declarator: testGraph3
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph testGraph3;
test_class.type: HierarchyMapGraph
test_class.var_name: testGraph3
test_class.declarator: testGraph4
test_class.modifier: private static
test_class.original_string: private static HierarchyMapGraph testGraph4;
test_class.type: HierarchyMapGraph
test_class.var_name: testGraph4
test_class.declarator: fastBackup
test_class.modifier: private static
test_class.original_string: private static boolean fastBackup;
test_class.type: boolean
test_class.var_name: fastBackup
test_class.file: SoftwarePraktikum/src/algorithmen/DijkstraTest.java
test_class.identifier: DijkstraTest
test_case.body: @Test
  	public void testNeighbourhoodFast() throws Exception {
  		long test = 0;
  		boolean fehler;
  		Config.fastestPathMode = true;
  		
  		/*
  		 * Test 1 - Nullpointer als Graph - erwarte Fehler/Exception
  		 */
  		/*
  		Dijkstra.H = 2;
  		fehler = false;
  		try {
  			test = Dijkstra.neighbourhood(null, 1, true);
  		} catch (Exception e) {
  			fehler =true;
  		}
  		
  		if (fehler == false)
  			fail("Test 1: Einen Nullpointer zu uebergeben hat keine Exception geworfen");
  		*/
  		
  		/*
  		 * Test 2 - illegale Node-ID - nutze dazu test3
  		 */
  		
  		fehler = false;
  		try{
  			test = Dijkstra.neighbourhood(test3, 55,(byte)0, true);
  		}catch(Exception e) {
  			fehler = true;
  		}
  		if (fehler == false){
  			fail("Test 2: Bei Eingabe einer ungueltigen Node-ID wurde keine Exception geworfen");
  		}
  		
  		/*
  		 * Test 3 - nutze test3 - erwarte fuer Startknoten 2 Ausgabe -1
  		 */
  		
  		test = Dijkstra.neighbourhood(test3, 2, (byte)0,true);
  		if (test != -1)
  			fail("Test 3: Die vorwaerts-scuhe auf einem isolierten Knoten liefert nicht -1 sondern: "+test);
  		
  		/*
  		 * Test 4 - nutze test3 - erwarte fuer Startknoten 2 Ausgabe -1
  		 */
  		
  		test = Dijkstra.neighbourhood(test3, 2,(byte)0, false);
  		if (test != -1)
  			fail("Test 4: Die ruekwaerts-scuhe auf einem isolierten Knoten liefert nicht -1 sondern: "+test);
  		
  		/*
  		 * Test 5 - nutze test5 - es existieren Kanten, aber wieder soll -1 ausgegben werden
  		 */
  		
  		test = Dijkstra.neighbourhood(test5, 5, (byte)0,true);
  		if (test != -1)
  			fail("Test 5: Die vorwaerts-scuhe auf einem isolierten Knoten bzql. ausgehender Knoten liefert nicht -1 sondern: "+test);
  		
  		
  		/*
  		 * Test 6 - nutze test5 - es existieren Kanten, aber wieder soll -1 ausgegben werden
  		 */
  		
  		test = Dijkstra.neighbourhood(test5, 2, (byte)0,false);
  		if (test != -1)
  			fail("Test 6: Die rueck.-scuhe auf einem isolierten Knoten bzql. eingehender Knoten liefert nicht -1 sondern: "+test);
  		
  		
  		/*
  		 * Test 7 - uebergebe einen leeren Graphen - erwarte auch hier -1
  		 */
  		fehler = false;
  		
  		try{
  			test = Dijkstra.neighbourhood(new HierarchyMapGraph(), 5, (byte)0,true);
  		}catch(Exception e){
  			fehler = true;
  		}
  		if (fehler == false)
  			fail("Test 7: Der leere Graph liefert nicht -1 sondern: "+test);
  		
  		
  		/*
  		 * Test 8 - nutze test8 - es existiert ein Zykel - evtl. bringt dieser den Algo durcheinander - erwarte 10
  		 */
  			/*
  		Dijkstra.H = 2;		
  		test = Dijkstra.neighbourhood(test8, 1, true);
  		if (test != 10)
  			fail("Test 8: Der Graph mit trivialem Zykel liefert nicht 10 sondern: "+test);
  			*/
  		
  		/*
  		 * testGraph1 - teste korrekte Werte
  		 */
  		Config.H = 2;
  		test = Dijkstra.neighbourhood(testGraph1, 1,(byte)0, true);
  		if (test!= 1*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph1: Der Algo liefert nicht "+1*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		
  		/*
  		 * testGraph2 - teste korrekte Werte
  		 */
  		Config.H = 2;
  		test = Dijkstra.neighbourhood(testGraph2, 1,(byte)0, true);
  		if (test!= 2*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph2: Der Algo liefert nicht "+2*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		Config.H = 4;
  		test = Dijkstra.neighbourhood(testGraph2, 1, (byte)0,true);
  		if (test!= 3*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph2: Der Algo liefert nicht "+3*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		Config.H = 5;
  		test = Dijkstra.neighbourhood(testGraph2, 1,(byte)0, true);
  		if (test!= 10*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph2: Der Algo liefert nicht "+10*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		
  		Config.H = 6;
  		test = Dijkstra.neighbourhood(testGraph2, 1, (byte)0,true);
  		if (test != -1)
  			fail("TestGraph2: Der Algo liefert nicht -1 sondern: "+test);
  		
  		
  		/*
  		 * testGraph3 - teste korrekte Werte
  		 */
  		Config.H = 3;
  		test = Dijkstra.neighbourhood(testGraph3, 1, (byte)0,true);
  		if (test!= 1000*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph3: Der Algo liefert nicht "+1000*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		Config.H = 4;
  		test = Dijkstra.neighbourhood(testGraph3, 1, (byte)0,true);
  		if (test != -1)
  			fail("TestGraph3: Der Algo liefert nicht -1 sondern: "+test);
  		
  		
  		/*
  		 * testGraph4 - teste korrekte Werte (nciht-trivialer Zykel, keine Dreiecksungleichung)
  		 */
  		
  		Config.H = 2;
  		test = Dijkstra.neighbourhood(testGraph4, 1,(byte)0, true);
  		if (test!= 2*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph4: Der Algo liefert nicht "+2*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		Config.H = 3;
  		test = Dijkstra.neighbourhood(testGraph4, 1,(byte)0, true);
  		if (test!= 3*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph4: Der Algo liefert nicht "+3*Config.getSpeedFactor(StreetType.MOTORWAY)*10000+" sondern: "+test);
  		
  		Config.H = 4;
  		test = Dijkstra.neighbourhood(testGraph4, 1, (byte)0,true);
  		if (test != -1)
  			fail("TestGraph4: Der Algo liefert nicht -1 sondern: "+test+" evtl. Knoten doppelt begangen?");
  		
  		
  		/*
  		 * testGraph4 - teste korrekte Werte (nciht-trivialer Zykel, keine Dreiecksungleichung) fuer rueckwaerts
  		 */
  
  		
  		Config.H = 2;
  		test = Dijkstra.neighbourhood(testGraph4, 2, (byte)0,false);
  
  		if (test!= 1*Config.getSpeedFactor(StreetType.MOTORWAY))
  			fail("TestGraph4: Der Algo(false) liefert nicht 1 sondern: "+test);
  
  		
  		Config.H = 3;
  		test = Dijkstra.neighbourhood(testGraph4, 2,(byte)0, false);
  
  		if (test != -1)
  			fail("TestGraph4: Der Algo(false) liefert nicht -1 sondern: "+test);
  
  		
  		Config.H = 4;
  		test = Dijkstra.neighbourhood(testGraph4, 2,(byte)0, false);
  		if (test != -1)
  			fail("TestGraph4: Der Algo(false) liefert nicht -1 sondern: "+test+" evtl. Knoten doppelt begangen?");
  	}
test_case.class_method_signature: DijkstraTest.testNeighbourhoodFast()
test_case.full_signature: @Test public void testNeighbourhoodFast()
test_case.identifier: testNeighbourhoodFast
test_case.invocations: neighbourhood fail neighbourhood fail neighbourhood fail neighbourhood fail neighbourhood fail neighbourhood fail neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood fail neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood fail neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood getSpeedFactor fail getSpeedFactor neighbourhood fail neighbourhood getSpeedFactor fail neighbourhood fail neighbourhood fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNeighbourhoodFast()
focal_class.declarator: debug = false
focal_class.modifier: static
focal_class.original_string: static boolean debug = false;
focal_class.type: boolean
focal_class.var_name: debug
focal_class.declarator: logger = Logger.getInstance()
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getInstance();
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: SoftwarePraktikum/src/algorithmen/Dijkstra.java
focal_class.identifier: Dijkstra
focal_class.class_method_signature: Dijkstra.updateNeighbours(HashMap<Integer,Vertex> nodes, PrQueue queue, HierarchyMapEdge newEdge, Vertex node, boolean mode)
focal_class.full_signature: private static void updateNeighbours(HashMap<Integer,Vertex> nodes, PrQueue queue, HierarchyMapEdge newEdge, Vertex node, boolean mode)
focal_class.identifier: updateNeighbours
focal_class.modifiers: private static
focal_class.parameters: (HashMap<Integer,Vertex> nodes, PrQueue queue, HierarchyMapEdge newEdge, Vertex node, boolean mode)
focal_class.return: void
focal_class.signature: void updateNeighbours(HashMap<Integer,Vertex> nodes, PrQueue queue, HierarchyMapEdge newEdge, Vertex node, boolean mode)
focal_class.class_method_signature: Dijkstra.neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_class.full_signature: public static long neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_class.identifier: neighbourhood
focal_class.modifiers: public static
focal_class.parameters: (HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_class.return: long
focal_class.signature: long neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_class.class_method_signature: Dijkstra.handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, MapGraph graph, 
  									HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.full_signature: private static boolean handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, MapGraph graph, 
  									HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.identifier: handleQueues
focal_class.modifiers: private static
focal_class.parameters: (HashMap<Integer,Vertex> nodes1, PrQueue forward, MapGraph graph, 
  									HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.return: boolean
focal_class.signature: boolean handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, MapGraph graph, 
  									HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.class_method_signature: Dijkstra.bidirectional(MapGraph graph, int startnode, int endnode)
focal_class.full_signature: public static ArrayList<MapNode> bidirectional(MapGraph graph, int startnode, int endnode)
focal_class.identifier: bidirectional
focal_class.modifiers: public static
focal_class.parameters: (MapGraph graph, int startnode, int endnode)
focal_class.return: ArrayList<MapNode>
focal_class.signature: ArrayList<MapNode> bidirectional(MapGraph graph, int startnode, int endnode)
focal_class.class_method_signature: Dijkstra.handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, 
  									    HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.full_signature: private static boolean handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, 
  									    HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.identifier: handleQueues
focal_class.modifiers: private static
focal_class.parameters: (HashMap<Integer,Vertex> nodes1, PrQueue forward, 
  									    HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.return: boolean
focal_class.signature: boolean handleQueues(HashMap<Integer,Vertex> nodes1, PrQueue forward, 
  									    HashMap<Integer,Vertex> nodes2, PrQueue backward, boolean mode)
focal_class.class_method_signature: Dijkstra.bidirectional(HierarchyMapGraph graph, int startnode, int endnode)
focal_class.full_signature: public static Path bidirectional(HierarchyMapGraph graph, int startnode, int endnode)
focal_class.identifier: bidirectional
focal_class.modifiers: public static
focal_class.parameters: (HierarchyMapGraph graph, int startnode, int endnode)
focal_class.return: Path
focal_class.signature: Path bidirectional(HierarchyMapGraph graph, int startnode, int endnode)
focal_method.body: public static long neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward) throws Exception{
  		
  		if (graph == null) throw new EmptyInputException("Leerer Graph uebergeben");
  		if (graph.getNode(startnode) == null) throw new InvalidInputException("Ungueltige ID uebergeben");
  		
  		int found = -1; //erster Knoten, der gefunden wird, ist der Startknoten, dieser wird nicht mitgezaehlt bei der Anzahl der Nachbarschaftsknoten
  		final HashMap<Integer,Vertex> nodes = new HashMap<Integer,Vertex>(); //Liste in der alle besuchten Knoten gespeichert werden.
  		final PrQueue queue = new PrQueue(); //Priority Queue, die alle erreichbaren Knoten enthaelt
  		
  		final Vertex start = new Vertex(graph.getNode(startnode),0); //Vertex ist die Hilfsklasse, in der zusaetzliche Infos ueber Knoten gespeichert werden.
  		nodes.put(startnode, start);
  		
  		queue.insert(start);
  		
  		while (queue.getSize() != 0){
  			final Vertex node = queue.extractMin();
  			final HierarchyMapNode realNode = (HierarchyMapNode) node.node;
  
  			found++;
  			if (found == Config.H) return node.getDist(); //Abbruchbedingung erfuellt
  			
  			Iterator <HierarchyMapEdge> edges = null;
  
  			if (forward){
  				edges = realNode.getOutgoingEdgesByHierarchy(level).iterator();
  			}else{
  				edges = realNode.getIncomingEdgesByHierarchy(level).iterator();
  			}
  						
  			while (edges.hasNext()){ //ueberpruefe alle benachbarten Knoten
  				final HierarchyMapEdge newEdge = edges.next();
  				updateNeighbours(nodes, queue, newEdge, node, forward);
  
  			}
  		} return -1; //wenn man bis hier kommt, gibt es keine H erreichbaren Knoten
  	}
focal_method.class_method_signature: Dijkstra.neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_method.full_signature: public static long neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_method.identifier: neighbourhood
focal_method.invocations: getNode getNode put insert getSize extractMin getDist iterator getOutgoingEdgesByHierarchy iterator getIncomingEdgesByHierarchy hasNext next updateNeighbours
focal_method.modifiers: public static
focal_method.parameters: (HierarchyMapGraph graph, int startnode, byte level, boolean forward)
focal_method.return: long
focal_method.signature: long neighbourhood(HierarchyMapGraph graph, int startnode, byte level, boolean forward)