GraphCS131/GraphCS131/Graph.cs
/// <summary>
/// Adds a vertex with the value to the graph
/// </summary>
/// <param name="val">The value to add</param>
/// <returns>True if it inserted, false if not</returns>
Adds a vertex with the value to the graph
Adds a vertex with the value to the graph
public bool AddVertex(T val)
        {
            if (Search(val) != null)
            {
                return false;
            }
            vertices.Add(new Vertex<T>(val));
            return true;
        }
public bool AddVertex ( T val ) { if ( Search ( val ) != null ) { return false ; } vertices . Add ( new Vertex < T > ( val ) ) ; return true ; }
Adds a vertex with the value to the graph
Adds a vertex with the value to the graph
True if it inserted, false if not
True if it inserted false if not
val
T
The value to add
The value to add