matcher.setMatchCost(5, 2, 3);
boolean res = matcher.minCostCavityMatching(7, 5) == 13;
System.out.println("Cavity matching test: " + res);
res = matcher.minCostMatching() == 7;
System.out.println("Full matching test: " + res);
TIntArrayList[] matching = matcher.getCurrMatching();
System.out.println("Current matching:");
for (int i = 0; i < matching[0].size(); ++i) {