OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (8)

Import a (RefLink[Graph, paclet:ref/Graph]) object from a LEDA file:

Import["ExampleData/sample.gw"]

Show vertex labels in the (RefLink[Graph, paclet:ref/Graph]):

Import["ExampleData/sample.gw",VertexLabels->"Name",ImagePadding->10]

Show the (RefLink[Import, paclet:ref/Import]) elements available for a LEDA file:

Import["ExampleData/sample.gw", "Elements"]

Import connectivity rules:

Import["ExampleData/sample.gw", "EdgeRules"]

Import the edge and vertex data stored in a LEDA graph file:

Import["ExampleData/sample.gw", {{"EdgeData","VertexData"}}]

Export a (RefLink[Graph, paclet:ref/Graph]) to the LEDA format:

Export["complete.gw",CompleteGraph[5],"LEDA"]

Export an asymmetric adjacency matrix of a graph to the LEDA format:

Export["directed.gw",{{0,1,1,0},{0,0,2,1},{0,0,0,0},{0,1,0,1}},"LEDA"]

Convert a list of edge rules representing an undirected graph to the LEDA language:

ExportString[{1->2,1->3,1->4,2->3,2->4,3->4},"LEDA"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[Graphlet, paclet:ref/format/Graphlet])  ▪  (RefLink[Graph6, paclet:ref/format/Graph6])  ▪  (RefLink[GraphML, paclet:ref/format/GraphML])  ▪  (RefLink[GXL, paclet:ref/format/GXL])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Importing & Exporting, paclet:guide/ImportingAndExporting])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}, {▪(RefLinkPlain[Mathematical Data, paclet:guide/MathematicalData])}, {▪(RefLinkPlain[Mathematical Data Formats, paclet:guide/MathematicalDataFormats])}})}})