AnonSec Shell
Server IP : 92.204.138.22  /  Your IP : 18.222.100.35
Web Server : Apache
System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64
User : internationaljou ( 1019)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/usr/share/graphviz/gvpr/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/usr/share/graphviz/gvpr/knbhd
/* knbhd - Return the k-neighborhood of a node, i.e., allnodes
 * whose path length from the given node is <= k.
 * ARGV[] = k node_name
 */
BEG_G {
  node_t  ctr;
  int     maxlen;

  graph_t comp = subg($, "kcomp");
  int     sid = 0, eid = 0;
  int     curlen;
  node_t  curnode;
  int     nlen[node_t];
  node_t  stk[int];
  node_t  other;
  edge_t  e;

  if (ARGC != 2) {
    printf (2, "Two arguments required\n");
    exit(1);
  }

  if (!sscanf(ARGV[0],"%d",&maxlen)) {
    printf (2, "Improper length parameter \"%s\"\n", ARGV[0]);
    exit(1);
  }
  maxlen++; /* length of 0 means unset */

  ctr = isNode ($, ARGV[1]);
  if (!ctr) {
    printf (2, "node %s not found\n", ARGV[1]);
    exit(1);
  }

  subnode (comp,ctr);
  nlen[ctr] = 1;
  curnode = ctr;
  while (curnode) {
    curlen = nlen[curnode];
    if (curlen == maxlen) break;
    
    for (e = fstedge(curnode); e; e = nxtedge(e,curnode)) {
      other = e.head;
      if (other == curnode) other = e.tail;
      if (nlen[other]) continue; /* already seen */
      subnode(comp,other);
      nlen[other] = curlen+1;
      stk[eid++] = other;
    }

    if (sid < eid) curnode = stk[sid++];
    else curnode = NULL;
  }
  
  induce(comp);
  write(comp);
}

Anon7 - 2022
AnonSec Team