/// <summary> /// /// </summary> /// <param name="eSearch"></param> /// <returns></returns> public int FindIndex(EdgeEnd eSearch) { GetEnumerator(); // force edgelist to be computed for (int i = 0; i < edgeList.Count; i++) { var e = edgeList[i]; if (e == eSearch) { return(i); } } return(-1); }
/// <summary> /// /// </summary> /// <param name="ee"></param> /// <returns></returns> public EdgeEnd GetNextCW(EdgeEnd ee) { var temp = Edges; temp = null; // Hack for calling property int i = edgeList.IndexOf(ee); int iNextCW = i - 1; if (i == 0) { iNextCW = edgeList.Count - 1; } return(edgeList[iNextCW]); }
/// <summary> /// Insert an EdgeEnd into the map, and clear the edgeList cache, /// since the list of edges has now changed. /// </summary> /// <param name="e"></param> /// <param name="obj"></param> protected void InsertEdgeEnd(EdgeEnd e, EdgeEnd obj) { edgeMap[e] = obj; edgeList = null; // edge list has changed - clear the cache }
/* * /// <summary> * /// * /// </summary> * protected EdgeEndStar() { } */ /// <summary> /// Insert a EdgeEnd into this EdgeEndStar. /// </summary> /// <param name="e"></param> abstract public void Insert(EdgeEnd e);
/// <summary> /// /// </summary> /// <param name="e"></param> public void Add(EdgeEnd e) { _nodes.Add(e); edgeEndList.Add(e); }
/* * /// <summary> * /// * /// </summary> * public DirectedEdgeStar() { } */ /// <summary> /// Insert a directed edge in the list. /// </summary> /// <param name="ee"></param> public override void Insert(EdgeEnd ee) { var de = (DirectedEdge)ee; InsertEdgeEnd(de, de); }