1
2 #include <igraph.h>
3
main()4 int main() {
5
6 igraph_t g;
7 igraph_vector_t ecc;
8
9 igraph_vector_init(&ecc, 0);
10
11 igraph_star(&g, 10, IGRAPH_STAR_UNDIRECTED, 0);
12 igraph_eccentricity(&g, &ecc, igraph_vss_all(), IGRAPH_OUT);
13 igraph_vector_print(&ecc);
14 igraph_destroy(&g);
15
16 igraph_star(&g, 10, IGRAPH_STAR_OUT, 0);
17 igraph_eccentricity(&g, &ecc, igraph_vss_all(), IGRAPH_ALL);
18 igraph_vector_print(&ecc);
19 igraph_destroy(&g);
20
21 igraph_star(&g, 10, IGRAPH_STAR_OUT, 0);
22 igraph_eccentricity(&g, &ecc, igraph_vss_all(), IGRAPH_OUT);
23 igraph_vector_print(&ecc);
24 igraph_destroy(&g);
25
26 igraph_vector_destroy(&ecc);
27
28 return 0;
29 }
30