public static OneWayArrayMap CreateEmpty(Connection type, int length) { ArrayConnection[] map = new ArrayConnection[length]; for (int i = 0; i < length; ++i) { map[i] = new ArrayConnection { Type = type, J = -1 }; } return(new OneWayArrayMap(map)); }
public void AddReverse(OneWayArrayMap towardsThis) { for (int i = 0; i < towardsThis.Length; ++i) { ArrayConnection towardsConnection = towardsThis[i]; if (towardsConnection.Type == Connection.Remained) { ArrayConnection connection; connection.J = i; connection.Type = Connection.Remained; Map[towardsConnection.J] = connection; } } }