Assert.assertEquals("right-hand side",matcher.getRightHandSide(),rightHand,Configuration.fpAccuracy);
Assert.assertEquals("right-hand side",matcher.getDiagonal(),diag,Configuration.fpAccuracy);
// Now copy the matcher and do another computation, with A and B reversed.
DetermineDiagonalAndRightHandSide anotherMather = null;
try {// based on http://forums.sun.com/thread.jspa?threadID=767974
anotherMather = matcher.getClass().getDeclaredConstructor(new Class[]{GDLearnerGraph.class}).newInstance(new Object[]{gdlearnerGraph});
} catch (Exception e) {
Assert.fail("Unexpected exception cloning a matcher: "+e);
}
anotherMather.compute(gr.findVertex(B),gr.findVertex(A),
matrixND.transitionMatrix.get(gr.findVertex(B)),matrixND.transitionMatrix.get(gr.findVertex(A)));
Assert.assertEquals("right-hand side",anotherMather.getRightHandSide(),rightHand,Configuration.fpAccuracy);
Assert.assertEquals("right-hand side",anotherMather.getDiagonal(),diag,Configuration.fpAccuracy);
}