Exemplo n.º 1
0
 /// <summary>
 /// Checks whether or not this <see cref="GraphArc"/> and another
 /// instance of <see cref="GraphArc"/> connect the same two instances of <see cref="GraphNode"/>.
 /// </summary>
 /// <param name="arc2">The second instance of <see cref="GraphArc"/> to test.</param>
 /// <returns>
 ///   <c>true</c> if both instances connect the same cells; otherwise, <c>false</c>
 /// </returns>
 public bool IsDuplicata(GraphArc arc2)
 {
     return(IsCellIn(arc2.node1.Cell) && IsCellIn(arc2.node2.Cell));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Tests the equality between the fields of two <see cref="GraphArc"/> instances.
 /// </summary>
 /// <param name="arc2">The <see cref="GraphArc"/> on which the test is realized.</param>
 /// <returns>
 ///   <c>true</c> if the specified <see cref="GraphArc"/>'s fields are equal to this instance; otherwise, <c>false</c>
 /// </returns>
 protected bool Equals(GraphArc arc2)
 {
     return(node1.Cell.Equals(arc2.node1.Cell) &&
            node2.Cell.Equals(arc2.node2.Cell));
 }