Re: KuhnMunkresMinimalWeightBipartitePerfectMatching does not seem to accept Double.NaN
You should not pass Double.NaN as an edge weight. The behavior of the class is pretty much undefined if you do so. Where did you read that you can disable edge that way? I'm pretty sure it's not stated anywhere in any class.
To disable edges, you have (at least) 4 different possibilities:
1. Delete the edge (obviously). Later you can re-add the edge.
2. Create a working graph, i.e. a copy of the original graph without that edge.