Cuttlefish file format (cff) - dev-cuttlefish/cuttlefish GitHub Wiki
Note: the implementation of the cff format is functional, but the latest development has focused on the CXF and CEF formats. Before using the cff format, please consider first the Cuttlefish eXtended Format cxf.
The Cuttlefish File Format is a formal grammar for the description of graphs such that a file representing such data structure following that grammar will be correctly parsed and interpreted by Cuttlefish. The graph file is a file with the node section in the first part followed by a separator *Edges after which the content with the information about the edges.
The node section contains only the data for the profiles of the nodes of the graph, including labels, identifiers and representation information. Each line of the file will represent a node of the network, with the following fields:
node: (id_int) , {id, [fill, border, size, shape]} , [var1, var2]
- id_int: an unique identifier for the node inside a network.
- id: a string to appear as the name of the node when representing it, surrounded by “” if some whitespace is present inside it.
- fill: similar representation as border for the background color of the node
- border: Three real values between 0 and 1 that represent the amount of Red, Green and Blue for the color of the node's border, i.e. 0.2 0.4 1
- size: real value representing the size of the representation of the node, given its shape
- shape: shape of the symbol that represents the node in the visualization. Possible shapes are circle or square, being circle the default
- (var1): String optional variable for particular uses. It will not appear on the network representation, but their values will be accessible through a data browser.
- (var2): Additional field as var1
536424 Erdös 1 1 1 0.5 0.5 0.5 10 231112 “Bollobas the myghty” 0 0 0 20394 “Reka Albert” 0.3 0.3 1 0.2 0 0 7 square
The edge section contains the data for the relations between the entities of the system, the nodes. We assume that the graph is oriented and is not a hypergraph (edges only connect two nodes).
edge: (id_origin, id_dest) , {[weight, width, color]}, [var1, var2]
- id_origin: integer identifier of the origin vertex of the arc
- id_dest: integer identifier of the destination of the arc
- weight: real value for the weight of the arc. It will be displayed on the network unless it is not specified or a * is in its place
- width: real value for the width of the representation of the arc
- color: color to paint the edge as in the vertices, represented by three real values.
- var1, var2: additional strings for keeping network data.