Code: Alles auswählen
public boolean checkBreakCondition()
{
return getIteration() < getGraph().getNodeList().size();
}
Code: Alles auswählen
public void executeVariant()
{
setIteration(getIteration()+1);
//currentNode = nodeQueue.remove();
}
Code: Alles auswählen
public void doFunctionality()
{
int k = getMatrixIndex(getCurrentNode());
int n = getGraph().getNodeList().size();
AbstractEdgeComparator<E> comp = getGraph().getComparator();
int v,w;
for(v = 1; v<=n; v++ )
{
for(w = 1; w <= n; w++)
{
setM(v,w,comp.min(getM(v,w),comp.sum(getM(v,k),getM(k,w))));
}
}
}
Code: Alles auswählen
public void preProcess() throws InvalidInputException
{
if(getGraph() == null) throw new InvalidInputException();
if(getNodeQueue() == null) throw new InvalidInputException();
if(!(getGraph().getNodeList().containsAll(getNodeQueue()) && getNodeQueue().containsAll((getGraph().getNodeList())))) throw new InvalidInputException();
AbstractEdgeComparator<E> comp = getGraph().getComparator();
setIteration(0);
ArrayList<Node<N,E>> queue = getNodeQueue();
int i,j,n=queue.size();
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
setM(i,j,comp.getMax());
}
for(Edge<N,E> edge : queue.get(i-1).getFanOut())
{
setM(getMatrixIndex(queue.get(i-1)),getMatrixIndex(edge.getTargetNode()),edge.getData());
}
setM(i,i,comp.getZero());
}
setCurrentNode(queue.get(0));
}
Code: Alles auswählen
Antwort des Servers
Junitreport
Time – 120
Testcount – 11
Failurecount – 2
Ignorerecount – 0
Failurereport
Testheadder – staticFunctionalityTestUndirectedGraphOne(graph.algorithm.FloydWarshallTest)
Message – row: 1, col: 4 expected:<8> but was:<2147483647>
Trace
Failurereport
Testheadder – dynamicFullyConnectedSolutionTest(graph.algorithm.FloydWarshallTest)
Message – Result of matrix M in row 1 and column 4 was supposed to be 2.372996 but was 2.932033. expected:<2.372995714696624> but was:<2.9320331529303645>
Trace
Kann mir jemand helfen?