示例#1
0
        public Graph(bool isDirected)
        {
            IsDirected = isDirected;
            Nodes      = new NodeCollection(this);

            if (isDirected)
            {
                Edges = new DirectedEdgeCollection(this);
            }
            else
            {
                Edges = new UndirectedEdgeCollection(this);
            }
        }
示例#2
0
文件: Graph.cs 项目: chadng/Rivers
        public Graph(bool isDirected)
        {
            IsDirected = isDirected;
            Nodes      = new NodeCollection(this);

            if (isDirected)
            {
                Edges = new DirectedEdgeCollection(this);
            }
            else
            {
                Edges = new UndirectedEdgeCollection(this);
            }

            SubGraphs = new SubGraphCollection(this);
            UserData  = new Dictionary <object, object>();
        }