/// <inheritdoc />
        public bool TryGetEdge(TVertex source, TVertex target, out SEquatableEdge <TVertex> edge)
        {
            if (ContainsEdge(source, target))
            {
                edge = new SEquatableEdge <TVertex>(source, target);
                return(true);
            }

            edge = default(SEquatableEdge <TVertex>);
            return(false);
        }
예제 #2
0
 /// <inheritdoc />
 public bool Equals(SEquatableEdge <TVertex> other)
 {
     return(EqualityComparer <TVertex> .Default.Equals(Source, other.Source) &&
            EqualityComparer <TVertex> .Default.Equals(Target, other.Target));
 }
 /// <inheritdoc />
 public bool ContainsEdge(SEquatableEdge <TVertex> edge)
 {
     return(ContainsEdge(edge.Source, edge.Target));
 }