/// <summary> Rank atomic vector, corresponds to step 4. /// /// </summary> /// <param name="v">the invariance pair vector /// </param> private void rankVector(System.Collections.ArrayList v) { int num = 1; int[] temp = new int[v.Count]; InvPair last = (InvPair)v[0]; System.Collections.IEnumerator it = v.GetEnumerator(); InvPair curr; //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" for (int x = 0; it.MoveNext(); x++) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" curr = (InvPair)it.Current; if (!last.Equals(curr)) { num++; } temp[x] = num; last = curr; } it = v.GetEnumerator(); //UPGRADE_TODO: Method 'java.util.Iterator.hasNext' was converted to 'System.Collections.IEnumerator.MoveNext' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratorhasNext'" for (int x = 0; it.MoveNext(); x++) { //UPGRADE_TODO: Method 'java.util.Iterator.next' was converted to 'System.Collections.IEnumerator.Current' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilIteratornext'" curr = (InvPair)it.Current; curr.Curr = temp[x]; curr.setPrime(); } }
/// <summary> /// Rank atomic vector, corresponds to step 4. /// </summary> /// <param name="v">the invariance pair vector</param> private static void RankArrayList(List <InvPair> v) { int num = 1; var temp = new int[v.Count]; InvPair last = (InvPair)v[0]; int x; x = 0; foreach (var curr in v) { if (!last.Equals(curr)) { num++; } temp[x++] = num; last = curr; } x = 0; foreach (var curr in v) { curr.Curr = temp[x++]; curr.SetPrime(); } }