public void AddEdge(IEdge edge, String varName, String elemName)
        {
            LGSPNamedGraph namedGraph = (LGSPNamedGraph)graph;

            namedGraph.AddEdge(edge, elemName);
            SetVariableValue(varName, edge);
        }
        public IEdge AddEdge(EdgeType edgeType, INode source, INode target, String varName, String elemName)
        {
            LGSPNamedGraph namedGraph = (LGSPNamedGraph)graph;
            IEdge          edge       = namedGraph.AddEdge(edgeType, source, target, elemName);

            SetVariableValue(varName, edge);
            return(edge);
        }
Example #3
0
 public static GRGEN_MODEL.@UEdge CreateEdge(GRGEN_LGSP.LGSPNamedGraph graph, GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target, string edgeName)
 {
     GRGEN_MODEL.@UEdge edge;
     if (poolLevel == 0)
     {
         edge = new GRGEN_MODEL.@UEdge(source, target);
     }
     else
     {
         edge            = pool[--poolLevel];
         edge.lgspFlags &= ~(uint)GRGEN_LGSP.LGSPElemFlags.HAS_VARIABLES;
         edge.lgspSource = source;
         edge.lgspTarget = target;
         // implicit initialization, container creation of UEdge
     }
     graph.AddEdge(edge, edgeName);
     return(edge);
 }