Server IP : 192.168.23.10  /  Your IP : 3.135.215.134
Web Server : Apache
System : Linux echo.premieradvertising.com 5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 7 14:54:22 EST 2023 x86_64
User : rrrallyteam ( 1049)
PHP Version : 8.1.32
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /usr/share/postgresql-setup/../emacs/../emacs/../graphviz/gvpr/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/postgresql-setup/../emacs/../emacs/../graphviz/gvpr/path
/* Report the distance from src = ARGV[0] to dst = ARGV[1]
 */
BEG_G {
  int dist[node_t];
  node_t n, curn;
  node_t src = node($G, ARGV[0]);
  node_t dst = node($G, ARGV[1]);
  $tvroot = src;
  $tvtype = TV_bfs;
}

N {
  curn = $;
  if ($ == dst) {
    printf ("dist from %s to %s is %d\n", src.name, dst.name, dist[dst]);
    exit(0);
  }
}

E {
  if ($.head == curn) n = $.tail; 
  else n = $.head;
  if (dist[n] == 0) dist[n] = dist[curn]+1;
}