public bool IsConnected(T a, T b) { ResetMarked(); var s = new ConnectedVertices <T>(this, a); return(IsMarked(b)); }
public void RemoveConnected(Vertex v) => ConnectedVertices.Remove(v);
public void AddConnected(Vertex v) => ConnectedVertices.Add(v);
public bool HasEdge(Vertex v) => ConnectedVertices.Exists(vertex => vertex.Id == v.Id);
public bool HasEdge(Vertex v) => ConnectedVertices.ContainsKey(v.Id);
//public DirectedEdge Connect(DirectedVertex head) //{ // var _e = new DirectedEdge(this, head); // //ConnectedEdges.Add(_e); // return _e; //} public void Connect(DirectedVertex head) { ConnectedVertices.Add(head); }