Function |
Description |
new Module.Graph() | Constructor for a Graph object. |
G.numberOfNodes() | Returns the number of nodes in a Graph G. |
G.numberOfEdges() | Returns the number of edges in a Graph G. |
G.empty() | Returns true if Graph has 0 edges and 0 nodes |
G.newNode() | Creates a new Node and returns it |
G.newEdge(node a, node b) | Creates a new Edge between 2 nodes a and b. |
G.allNodes() | Returns a List of Nodes of Graph G. |
G.allEdges() | Returns a List of Edges of Graph G. |
Function |
Description |
new Module.GraphAttributes(Graph G, long initAttributes) | Constructor for a GraphAttributes Object, intiAttributes can be zero or combination of enums. |
GA.setX(node a, double val) | sets the x co-ordinate of node a. (Top left corner is the origin) |
GA.x(node a) | returns the x-cordinate of node a |
GA.setY(node a, double val) | sets the y co-ordinate of node a. (Top left corner is the origin) |
GA.y(node a) | returns the y-cordinate of node a |
GA.setWidth(node a, double val) | sets the width of node a. |
GA.width(node a) | returns the width of node a |
GA.setHeight(node a, double) | sets the height of node a. |
GA.height(node a) | returns the height of node a. |
GA.setEdgeColor(edge e,Color c) | sets the color of edge e to Color c, which is an object of class Color. |
GA.strokeColor(edge e) | returns the Color of edge a. |
GA.setNodeColor(node a,Color c) | sets the color of node a to Color c, which is an object of class Color. |
GA.fillColor(node a) | returns the Color of node a. |
GA.setDirected(bool directed) | Makes the Graph Directed if directed is true and vice versa. |
GA.directed() | returns true is G is directed Graph else returns false. |
GA.setBend(edge e, DPolyline dpl) | sets the bend points of the edge e extracted from dpl. |
GA.bends(edge e) | returns the DPolyline which contains the bend points. |
GA.setStrokeWidth(edge e,double val) | sets the StrokeWidth of the edge e to val. |
GA.strokeWidth(edge e) | returns the StrokeWidth for edge e. |
GA.setStrokeType(edge e, StrokeType st) | sets the StrokeType of edge e to st(object of StrokeType class). |
Function |
Description |
Module.randomGraph(Graph G, nodes n, edges e) | Constructs a random Graph with n nodes and e edges. |
Module.randomSimpleGraph(Graph G, nodes n, edges e) | Constructs a random Simple Graph with n nodes and e edges. |
Module.completeGraph(Graph G, nodes n, edges e) | Constructs a complete Graph with n nodes and e edges. |
Module.completeBipartiteGraph(Graph G, nodes n, edges e) | Constructs a complete Bipartite Graph with n nodes and e edges. |
Module.planarConnectedGraph(Graph G, nodes n, edges e) | Constructs a planar Connected Graph with n nodes and e edges. |