How can I programmatically access information about a 'Graph` object in Mathematica 8?
问题 I'm trying to access information within a Graph object in Mathematica 8. For some reason, the Part command does not seem to work. myGraph is the object I want to gain access to. The first line below displays myGraph. The others serve to inspect it. myGraph myGraph // FullForm myGraph // InputForm myGraph // OutputForm myGraph[[1]] myGraph[[2]] Why doesn't myGraph[[1]] return List[1,3,4,2,5] ? [I checked to level 2 just in case Graph were wrapped by some invisible wrapper. Level[myGraph,1] ,