Trivial Graph Format
Trivial Graph Format (TGF) is a simple text-based adjacency list file format for describing graphs,[1] widely used because of its simplicity.[2]
Format
The format consists of a list of node definitions, which map node IDs to labels, followed by a list of edges, which specify node pairs and an optional edge label. Because of its lack of standardization, the format has many variations.[1] For instance, some implementations of the format require the node IDs to be integers,[3] while others allow more general alphanumeric identifiers.
Each node definition is a single line of text starting with the node ID, separated by a space from its label. The node definitions are separated from the edge definitions by a line containing the "#" character. Each edge definition is another line of text, starting with the two IDs for the endpoints of the edge separated by a space. If the edge has a label, it appears on the same line after the endpoint IDs.[3]
The graph may be interpreted as a directed or undirected graph. For directed graphs, to specify the concept of bi-directionality in an edge, one may either specify two edges (forward and back) or differentiate the edge by means of a label.
Example
A simple graph with two nodes and one edge might look like:
1 First node 2 Second node # 1 2 Edge between the two
See also
- yEd, a graph editor that can handle TGF file format.
References
- ^ a b Roughan, Matthew; Tuke, Jonathan (August 2015), "The Hitchhikers Guide to Sharing Graph Data" (PDF), 2015 3rd International Conference on Future Internet of Things and Cloud, IEEE, doi:10.1109/ficloud.2015.76, S2CID 14560300
- ^ Pitas, Ioannis (2016), "1.5 Graph storage formats and visualization", Graph-Based Social Media Analysis, Chapman & Hall/CRC Data Mining and Knowledge Discovery Series, vol. 39, CRC Press, p. 14, ISBN 9781498719056
- ^ a b Canabrava, Tomaz; Cord-Landwehr, Andreas (April 10, 2016), "Chapter 4. Import and Export", The Rocs Handbook, Revision Rocs 2.1.50 (Applications 16.04)
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.