function [oddPairs,paths] = oddPairsShortest(outEdges, oddNodes)

% do dijkstra's brute force all pairs shortest paths
% (since we don't have a dense graph), and give dijkstra a hint that we're
% going to ignore some of the output.
for i=1:length(oddNodes),
	[d,p] = dijkstra(outEdges, oddNodes(i), oddNodes);
	oddPairs(i,:) = d(oddNodes)';
	paths(oddNodes(i),:) = p';
end

% make self-nodes Inf cost because there's no edge there we can cut.
oddPairs(oddPairs==0) = Inf;

