GraphCS131/GraphCS131/Graph.cs
/// <summary>
/// Searches for a given value in the graph
/// </summary>
/// <param name="val">The value to search for</param>
/// <returns>The Vertex that has the matching value</returns>
Searches for a given value in the graph
Searches for a given value in the graph
public Vertex<T> Search(T val)
        {
            foreach (var item in vertices)
            {
                if (item.Value.Equals(val))
                {
                    return item;
                }
            }
            return null;
        }
public Vertex < T > Search ( T val ) { foreach ( var item in vertices ) { if ( item . Value . Equals ( val ) ) { return item ; } } return null ; }
Searches for a given value in the graph
Searches for a given value in the graph
The Vertex that has the matching value
The Vertex that has the matching value
val
T
The value to search for
The value to search for