public static IList UniqueSelf(UnaryOpStorage/*!*/ hashStorage, BinaryOpStorage/*!*/ eqlStorage, RubyArray/*!*/ self) { self.RequireNotFrozen(); return UniqueSelf(hashStorage, eqlStorage, (IList)self); }
public static IList FlattenInPlace(ConversionStorage<IList>/*!*/ tryToAry, RubyArray/*!*/ self) { self.RequireNotFrozen(); return FlattenInPlace(tryToAry, (IList)self); }
public static IList FlattenInPlace(ConversionStorage<IList>/*!*/ tryToAry, RubyArray/*!*/ self, [DefaultProtocol, DefaultParameterValue(-1)] int maxDepth) { self.RequireNotFrozen(); return FlattenInPlace(tryToAry, (IList)self, maxDepth); }
public static RubyArray ShuffleInPlace(RubyContext/*!*/ context, RubyArray/*!*/ self) { self.RequireNotFrozen(); var generator = context.RandomNumberGenerator; for (int i = self.Count - 1; i >= 0; i--) { int j = generator.Next(i + 1); object value = self[i]; self[i] = self[j]; self[j] = value; } return self; }