"diameter", "has_a_cycle" problems in Graph-0.76 module - Perl

This is a discussion on "diameter", "has_a_cycle" problems in Graph-0.76 module - Perl ; Hello all, I have some problems with these two functions in Graph : "diameter" and "has_a_cycle". "diameter" works only at the first time it's used. If then I added some other vertices and edges, and call diameter again, it returns ...

+ Reply to Thread
Results 1 to 2 of 2

"diameter", "has_a_cycle" problems in Graph-0.76 module

  1. Default "diameter", "has_a_cycle" problems in Graph-0.76 module

    Hello all,

    I have some problems with these two functions in Graph : "diameter" and
    "has_a_cycle".

    "diameter" works only at the first time it's used. If then I added some
    other vertices and edges, and call diameter again, it returns the
    previous value, no matter how the graph is changed.

    "has_a_cycle" should return true when there is a cycle in the graph,
    and false if not. However, when there is no cycle, it returns
    "uninitialized value" instead of false.

    Thanks for help.


  2. Default Re: "diameter", "has_a_cycle" problems in Graph-0.76 module

    The return of undef value in "has_a_cycle" seems to have no harm.
    Thanks again to wolverian and purl for making it clear to me.

    hi_ryo

    > "has_a_cycle" should return true when there is a cycle in the graph,
    > and false if not. However, when there is no cycle, it returns
    > "uninitialized value" instead of false.



+ Reply to Thread

Similar Threads

  1. email-display: "N", "D", " ": yeah; but "O"? How to MARK "O"?
    By Application Development in forum Mutt
    Replies: 0
    Last Post: 10-30-2007, 07:13 AM
  2. Replies: 1
    Last Post: 09-19-2007, 09:45 PM
  3. Replies: 3
    Last Post: 06-28-2007, 01:35 AM
  4. Replies: 0
    Last Post: 03-21-2007, 01:26 PM
  5. """""""""""""""""""""Visual C++ 2005 Express"""""""""""""""""
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 03-12-2006, 03:55 AM