public RandomString(RndType type, int length) { Random random = new Random(); string chars = this.GetChars(type); this.Value = new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray()); }
private string GetChars(RndType type) { switch (type) { case RndType.UPPER: return(UPPER); case RndType.LOWER: return(LOWER); case RndType.ADDRESS: return(ADDRESS); default: return(DIGITS); } }
public RndByte(RndType rdtype) { this.rdtype = rdtype; }
public Xavier(RndType rnd_type = RndType.Uniform, FactorType factor_type = FactorType.Avg, float magnitude = 3) { this._rnd_type = rnd_type; this._factor_type = factor_type; this._magnitude = magnitude; }