/// <summary> /// Removes the given vertex from this graph. /// </summary> /// <param name="vertex">Vertex to remove.</param> /// <returns>True if the vertex was removed, false otherwise.</returns> public virtual bool RemoveVertex([NotNull] TVertex vertex) { if (vertex == null) { throw new ArgumentNullException(nameof(vertex)); } if (!Wrapped.ContainsVertex(vertex)) { return(false); } RemoveChildVertex(vertex); Wrapped.RemoveVertex(vertex); Parent?.RemoveVertex(vertex); return(true); }
/// <summary> /// Determines whether the <see cref="ClusteredAdjacencyGraph"/> /// contains the vertex <paramref name="v"/>. /// </summary> /// <param name="v"> /// The vertex to locate in <see cref="ClusteredAdjacencyGraph"/>. /// </param> /// <returns> /// true if the <see cref="ClusteredAdjacencyGraph"/> contains /// the vertex <paramref name="v"/>; otherwise, false. /// </returns> public bool ContainsVertex(IVertex v) { return(Wrapped.ContainsVertex(v)); }
/// <inheritdoc /> public bool ContainsVertex(TVertex vertex) { return(Wrapped.ContainsVertex(vertex)); }