how to get attribute of gml?

Asked by cindy

the gml like below:
graph
[
  directed 1
  node
  [
    id 0
    label "test1"
    value 7
  ]
  node
  [
    id 1
    label "test2"
    value 0
  ]
  node
  [
    id 2
    label "test3"
    value 2
  ]
  node
  [
    id 3
    label "test4"
    value 3
  ]
  node
  [
    id 4
    label "test5"
    value 7
  ]
  node
  [
    id 5
    label "test6"
    value 3
  ]
  node
  [
    id 6
    label "test7"
    value 2
  ]

  edge
  [
    source 1
    target 0
  ]
  edge
  [
    source 2
    target 0
  ]
  edge
  [
    source 3
    target 0
  ]
  edge
  [
    source 4
    target 0
  ]
  edge
  [
    source 5
    target 0
  ]
  edge
  [
    source 6
    target 0
  ]

i call the igraph_read_graph_gml to create a graph,but i can`t get the attribute of label through the results, how to?

Question information

Language:
English Edit question
Status:
Solved
For:
igraph Edit question
Assignee:
No assignee Edit question
Solved by:
Tamás Nepusz
Solved:
Last query:
Last reply:
Revision history for this message
Best Tamás Nepusz (ntamas) said :
#1

Please read the "Accessing attributes from C" chapter of the manual:

http://igraph.sourceforge.net/doc/html/ch12s02.html

Revision history for this message
cindy (cindy-zhengyan) said :
#2

igraph_i_set_attribute_table(&igraph_cattribute_table);

thanks!

Revision history for this message
cindy (cindy-zhengyan) said :
#3

Thanks Tamás Nepusz, that solved my question.