Exemplo n.º 1
0
        public void add(GraphEdge edge)
        {
            if (_edges == null)
            {
                _edges = new List <GraphEdge>();
            }

            _edges.Add(edge);
        }
Exemplo n.º 2
0
        private void processNodes()
        {
            foreach (DFGNode n in _dfg.nodes)
            {
                GraphNode?source = processNode(n);

                if (source != null)
                {
                    foreach (DFGNode an in n.adjacencyList)
                    {
                        GraphNode?target = processNode(an);
                        if (target != null)
                        {
                            GraphEdge ge = new GraphEdge(source.Value, target.Value, EdgeRelation.Direct, "", true);
                            _graph.add(ge);
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void addASTEdge(GraphNode node, string label)
        {
            GraphEdge edge = new GraphEdge(_nodeStack.Peek(), node, EdgeRelation.AST, label, false);

            _graph.add(edge);
        }