Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Path::Graph 0.02

    Download button

    No screenshots available
    Downloads: 392  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Cristian Vasquez Diaz | More programs
    Perl Artistic License / FREE
    June 28th, 2007, 22:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Path::Graph description

    Path::Graph is a Perl module created to generate paths from hash graph.

    Path::Graph is a Perl module created to generate paths from hash graph.

    SYNOPSIS

    Code 1

    #!usr/bin/perl
    my %graph = ( A => {B=>1,C=>4}, B => {A=>1,C=>2}, C => {A=>4,B=>2}
    );
    use Paths::Graph;
    my $g = Paths::Graph->new(-origin=>"A",-destiny=>"C",-graph=>%graph);
    my @paths = $g->shortest_path();
    for my $path (@paths) {
    print "Shortest Path:" . join ("->" , @$path) . " Cost:". $g->get_path_cost(@$path) ."n";
    }

    This package provides an object class which can be used to get diferents graph paths , with only pure perl code and I don't use other packet or module cpan.

    This class calculates the shortest path between two nodes in a graph and return in other method , vals in the execution time (free_path_event).

    Technically , the graph is composed of vertices (nodes) and edges (with optional weights) linked between them.

    The shortest path is found using the Dijkstra's algorithm. This algorithm is the fastest and requires all weights to be positive.

    The object builds a help about this concept of the graph's , exist a method named debug().

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    generate paths | hash graph | Perl module | Path::Graph | generate | paths

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM