TGF (.tgf) Graph Format - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Formats : Formats/TGF

TGF (.tgf) Graph Format

TGF file format

 

Description

Examples

Description

• 

TGF (Trivial Graph Format) is a simple text-based file format for storing a single graph.

• 

It also allows the application of labels to vertices and edges.

• 

The format does not specify whether the graph is directed or undirected.

• 

The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.

• 

The general-purpose commands Import and Export also support this format.

Examples

Import a TGF file encoding a directed graph.

GImportexample/digraph.tgf,base=datadir

GGraph 1: a directed unweighted graph with 11 vertices and 12 arc(s)

(1)

GraphTheory:-DrawGraphG,style=spring

Export the Dyck graph to a TGF file in the home directory of the current user.

DGGraphTheory:-SpecialGraphs:-DyckGraph

DGGraph 2: an undirected unweighted graph with 32 vertices and 48 edge(s)

(2)

Exportdyck.tgf,DG,base=homedir

437

(3)

See Also

Formats

GraphTheory