public static bool Equals(Intarray a, Intarray b) { if (a.Length() != b.Length()) return false; for (int i = 0; i < a.Length(); i++) if (a.UnsafeAt1d(i) != b.UnsafeAt1d(i)) return false; return true; }
public float this[int index] { get { for (int j = 0; j < _keys.Length(); j++) { if (_keys.UnsafeAt1d(j) == index) { return(_values[j]); } } _keys.Push(index); _values.Push(0f); if (index >= _len) { _len = index + 1; } return(_values.Last()); } set { for (int j = 0; j < _keys.Length(); j++) { if (_keys.UnsafeAt1d(j) == index) { _values[j] = value; return; } } _keys.Push(index); _values.Push(value); if (index >= _len) { _len = index + 1; } } }
public static bool Equals(Intarray a, Intarray b) { if (a.Length() != b.Length()) { return(false); } for (int i = 0; i < a.Length(); i++) { if (a.UnsafeAt1d(i) != b.UnsafeAt1d(i)) { return(false); } } return(true); }