• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cycle check on MST

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
im currently writing a program to create an MST as from a weighted graph of places and distances between them. Im nearly finished, however my one final problem is when i make the method loop through to create a tree for the whole graph (which im representing in the form of an adjacency matrix) my checking for cycles doesnt work correctly.
If anyone would be willing to take a look there is a lot of code in the two files so i will email them to you.
You will be able to see the result im getting now but the result should be as follows:
Man -- 12 -- Aber
Aber -- 19 -- Edin
Edin -- 32 -- Kent
Kent -- 31 -- Card
Card -- 75 -- Carl
Carl -- 84 -- Leic
Leic -- 16 -- Liv


Thanks in advance
Ernest
 
reply
    Bookmark Topic Watch Topic
  • New Topic