Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use Combinatorica's BipartiteMatching algorithm on a weighted graph. I need to use real numbers as weights. If I try the following

graph = CompleteGraph[1, 1]
graph = SetEdgeWeights[graph, {1}]
BipartiteMatching[graph]

it correctly gives the perfect matching {{1,2}}.

But if instead I try this

graph = CompleteGraph[1, 1]
graph = SetEdgeWeights[graph, {1.}]
BipartiteMatching[graph]

(the only difference being the decimal point), it hangs, apparently forever. Am I missing something obvious? Any help would be much appreciated!

share|improve this question

migrated from stackoverflow.com Jun 28 '12 at 23:54

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.