예제 #1
0
void* CopieG(void* g)
{ int i, n = NrNoduri(g);
  AG c = (AG)AlocG (n);
  TCost * s = ((AG)g)->x;

  if (!c) return NULL;
  memcpy(c->x, s, n*n*sizeof(TCost));
  return (void*)c;
}
예제 #2
0
파일: main.c 프로젝트: ratza128/App_Parser
int NrNoduri(TArb r)        /* numarul de noduri din arborele r -*/
{ if (!r) return 0;          /* arbore vid => 0 noduri */
  return 1 + NrNoduri(r->st) + NrNoduri(r->dr);
}