示例#1
0
        /// <summary>
        /// Finds an edge in this graph with the given origin
        /// and destination, if one exists.
        /// </summary>
        /// <param name="orig">the origin location</param>
        /// <param name="dest">the destination location</param>
        /// <returns>an edge with the given orig and dest, or null if none exists</returns>
        public HalfEdge FindEdge(Coordinate orig, Coordinate dest)
        {
            HalfEdge e = vertexMap[orig];

            return(e == null ? null : e.Find(dest));
        }
 /// <summary>
 /// Marks the edges in a pair.
 /// </summary>
 /// <param name="e">an edge of the pair to mark</param>
 public static void MarkBoth(HalfEdge e)
 {
     ((MarkHalfEdge)e).Mark();
     ((MarkHalfEdge)e.Sym).Mark();
 }
 /// <summary>
 /// Sets the mark for the given edge pair to a boolean value.
 /// </summary>
 /// <param name="e">an edge of the pair to update</param>
 /// <param name="isMarked">the mark value to set</param>
 public static void SetMarkBoth(HalfEdge e, bool isMarked)
 {
     ((MarkHalfEdge)e).Marked     = isMarked;
     ((MarkHalfEdge)e.Sym).Marked = isMarked;
 }
 public static void SetMark(HalfEdge e, bool isMarked)
 {
     ((MarkHalfEdge)e).Marked = isMarked;
 }
 public static void Mark(HalfEdge e)
 {
     ((MarkHalfEdge)e).Mark();
 }
 public static bool IsMarked(HalfEdge e)
 {
     return(((MarkHalfEdge)e).Marked);
 }