示例#1
0
    public bool IsConnected(T a, T b)
    {
        ResetMarked();
        var s = new ConnectedVertices <T>(this, a);

        return(IsMarked(b));
    }
示例#2
0
 public void RemoveConnected(Vertex v) => ConnectedVertices.Remove(v);
示例#3
0
 public void AddConnected(Vertex v) => ConnectedVertices.Add(v);
示例#4
0
 public bool HasEdge(Vertex v) => ConnectedVertices.Exists(vertex => vertex.Id == v.Id);
示例#5
0
 public bool HasEdge(Vertex v) => ConnectedVertices.ContainsKey(v.Id);
示例#6
0
        //public DirectedEdge Connect(DirectedVertex head)
        //{
        //    var _e = new DirectedEdge(this, head);
        //    //ConnectedEdges.Add(_e);

        //    return _e;
        //}

        public void Connect(DirectedVertex head)
        {
            ConnectedVertices.Add(head);
        }