A-Stern: doFunctionality: Message –
Verfasst: 18. Jun 2017 19:23
Ähnlich wie bei Bellman-Ford bekomme ich total nichtssagende Fehlermeldungen. Hier ist mein Code:
Hier sind die Fehlermeldungen:
Hier besteht mein Code wenigstens 3/5 Tests... Aber wieder einmal kann ich mir nicht sicher sein, ob die verbeleibenden zwei fehlerhaft sind oder ich tatsächlich Fehler gemacht habe.
Kann mir jemand weiterhelfen?
Code: Alles auswählen
public void doFunctionality()
{
Node<N,E> currentNode = getCurrentNode();
if(currentNode == null || currentNode == getTargetNode()) setPathFound(true);
else
{
getClosedList().add(currentNode);
expandNode(currentNode);
}
}
Code: Alles auswählen
private void expandNode(Node<N, E> node)
{
if(node == null) return;
AbstractEdgeComparator<E> comp = getComparator();
PriorityQueue<Node<N, E>> openList = getOpenList();
Node<N,E> targetNode;
for(Edge<N,E> edge : node.getFanOut())
{
targetNode = edge.getTargetNode();
openList.offer(targetNode);
if(sourceDistanceMap.get(targetNode) == null)
{
sourceDistanceMap.put(targetNode,comp.sum(sourceDistanceMap.get(node),edge.getData()));
predecessorMap.put(targetNode,node);
}
else
{
if(comp.compare(sourceDistanceMap.get(targetNode),comp.sum(sourceDistanceMap.get(node),edge.getData())) > 0)
{
sourceDistanceMap.put(targetNode,comp.sum(sourceDistanceMap.get(node),edge.getData()));
predecessorMap.put(targetNode,node);
}
}
}
}
Code: Alles auswählen
Antwort des Servers
Junitreport
Time – 259
Testcount – 5
Failurecount – 2
Ignorerecount – 0
Failurereport
Testheadder – staticFunctionTest(graph.algorithm.astar.AStarFunctionalityTest)
Message –
Trace
Failurereport
Testheadder – dynamicFunctionTestNotConnected(graph.algorithm.astar.AStarFunctionalityTest)
Message –
Trace
Kann mir jemand weiterhelfen?