0001-Adding-new-rst-package-graph-with-edge-list-graph-da.patch

D. Seidel, 10/02/2013 01:41 PM

Download (2.84 KB)

View differences:

proto/sandbox/rst/graph/EdgeListGraph.proto
1
package rst.graph;
2

  
3
import "rst/graph/GraphNode.proto";
4
import "rst/graph/GraphEdge.proto";
5

  
6
option java_outer_classname = "GraphType";
7

  
8
/**
9
 * Holds information about an edge list graph data structure.
10
 *
11
 * @author Daniel Seidel <dseidel@techfak.uni-bielefeld.de>
12
 */
13
message EdgeListGraph {
14

  
15
    /** 
16
     * List of the nodes in the graph.
17
     */
18
    repeated GraphNode nodes = 1;
19
    
20
    /** 
21
     * List of the edges in the graph.
22
     */
23
    repeated GraphEdge edges = 2;
24
    
25
}
proto/sandbox/rst/graph/GraphEdge.proto
1
package rst.graph;
2

  
3
option java_outer_classname = "GraphEdgeType";
4

  
5
/**
6
 * Connection information of an edge in an edge list graph.
7
 *
8
 * @author Daniel Seidel <dseidel@techfak.uni-bielefeld.de>
9
 */
10
message GraphEdge {
11

  
12
    /**
13
     * Index to the head node in the graph's node list.
14
     */
15
    required uint32 head = 1;
16
    
17
    /**
18
     * Index to the tail node in the graph's node list.
19
     */
20
    required uint32 tail = 2;
21
    
22
    /**
23
     * Arbitrary data describing the edge, e.g. traversion cost.
24
     *
25
     * Specific to application creating the graph.
26
     */
27
    repeated float data = 3;
28

  
29
}
proto/sandbox/rst/graph/GraphNode.proto
1
package rst.graph;
2

  
3
option java_outer_classname = "GraphNodeType";
4

  
5
/**
6
 * Data of a node in an edge list graph.
7
 *
8
 * @author Daniel Seidel <dseidel@techfak.uni-bielefeld.de>
9
 */
10
message GraphNode {
11
   
12
    /**
13
    * Arbitrary data describing the node, e.g. location coordinates.
14
    *
15
    * Specific to application creating the graph.
16
    */
17
    repeated float data = 1;
18
    
19
}
0
-