/// <summary> /// Initializes a new instance of the <see cref="Grid2DFactory" /> class. /// </summary> /// <param name="generator">The generator.</param> /// <exception cref="System.ArgumentNullException">generator</exception> public Grid2DFactory(IRandomNumber generator) { if (generator == null) { throw new ArgumentNullException("generator"); } _generator = generator; }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="VariableLengthStringGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public VariableLengthStringGenerator(IRandomNumber rnd, int maxLength, bool unicode) : base(rnd) { EnsureArg.IsGt(maxLength, 0, nameof(maxLength)); this.maximumlength = maxLength; this.isUnicode = unicode; }
/// <summary> /// Picks a random datum from the data. /// </summary> /// <param name="generator">The generator.</param> /// <returns>IDatum.</returns> public IDatum PickRandom(IRandomNumber generator) { var size = _colors.Length; var index = (int)Math.Round(generator.GetDouble(0, size - 1)); var color = _colors[index]; return(new ColorDatum(color)); }
public RandomStrategy(IRandomNumber randomNumber, SimpleFitness fitness) : base(fitness) { if (randomNumber == null) throw new ArgumentNullException("randomNumber"); if (fitness == null) throw new ArgumentNullException("fitness"); _randomNumber = randomNumber; }
public Game(IConfiguration settings, IRandomNumber randomNumber, IDataConsole dataConsole) { _numberOfAttempts = settings.GetValue <int>("NumberOfAttempts"); _rangeStart = settings.GetValue <int>("RangeStart"); _rangeEnd = settings.GetValue <int>("RangeEnd"); _dataConsole = dataConsole; _randomNumber = randomNumber; }
public CPU( IScreenRenderer screenRenderer, IUserInput userInput, IBeep beep, IRandomNumber randomNumber, ILogger logger = null) { _screenRenderer = screenRenderer; _userInput = userInput; _beep = beep; _randomNumber = randomNumber; _logger = logger; Reset(); }
/// <summary> /// Creates the random. /// </summary> /// <param name="generator">The generator.</param> /// <returns>INeuron.</returns> public INeuron CreateRandom(IRandomNumber generator) { var dimensions = _dimensions; // create weights var weigths = new WeightVector(dimensions); for (int i = 0; i < dimensions; ++i) { weigths[i] = generator.GetDouble(0, 1); } // create neuron var neuron = new Kohonen.Neuron.Neuron(weigths); return(neuron); }
public SendingVerifyingEmail(IRandomNumber _irandom, IDescriptionVerificationNumber _desc, ISendingEmailTimeVerification _isending) { this._irandom = _irandom; this._idesc = _desc; this._isendingMeailAndCheck = _isending; }
public RandomGridProvider(IRandomNumber random) { _random = random; }
public CaptchaService(IRandomNumber random) { this.random = random; }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="DateTimeGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public DateTimeGenerator(IRandomNumber rnd, int precision, int maxLength) : base(rnd) { this.dateType = ComputeDateType(precision, maxLength); }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="GuidGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public GuidGenerator(IRandomNumber rnd) : base(rnd) { }
public CaptchaService(IRandomNumber randomizer) { this.randomizer = randomizer; }
public CaptchaService(IRandomNumber random) { this.random = random; }
/// <summary> /// Initialise une nouvelle instance de la classe <see cref="TypeGeneratorFactory"/> /// </summary> /// <param name="rnd">Le générateur aléatoire à utiliser</param> public TypeGeneratorFactory(IRandomNumber rnd) { EnsureArg.IsNotNull(rnd, nameof(rnd)); this.random = rnd; }
public UserScore(IRandomNumber randumNum) { this.randomNum = randumNum; }
public Tests(IRandomNumber randomNumber) { _randomNumber = randomNumber; }
public Player(IRandomNumber randonNumber) { _randonNumber = randonNumber; }
/// <summary> /// Initializes a new instance of the <see cref="RgbDataSet" /> class. /// </summary> /// <param name="generator">The generator.</param> /// <param name="size">The size of the data set.</param> /// <param name="discreteColors">The discrete colors.</param> public DiscreteRandomRgbDataSetProvider(IRandomNumber generator, int size, params Color[] discreteColors) : this(size, discreteColors) { SetRandomNumberGenerator(generator); }
/// <summary> /// Sets the random number generator. /// </summary> /// <param name="generator">The generator.</param> public void SetRandomNumberGenerator(IRandomNumber generator) { _generator = generator; }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="BitGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public BitGenerator(IRandomNumber rnd) : base(rnd) { }
/// <summary> /// /// </summary> /// <param name="randomNumber"></param> public IOCController(IRandomNumber randomNumber) { _randomNumber = randomNumber; }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="DoubleGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public DoubleGenerator(IRandomNumber rnd) : base(rnd) { }
public DummyGenerator(IRandomNumber rnd) : base(rnd) { }
public Generate(IRandomNumber rdn) { _rdn = rdn; }
public static void InitializeLogFactory(IRandomNumber randomNumber) { _randomNumber = randomNumber; }
public AbTest(IAbTestingService abTestingService, IRandomNumber randomNumber) { _abTestingService = abTestingService; _randomNumber = randomNumber; }
public PlayerBuilder(IRandomNumber randomNumber) { _randomNumber = randomNumber; _player = new Player(_randomNumber); }
public CaptchaService() { this.random = new RandomNumber(); }
public Function1(IRandomNumber randomService) { _randomService = randomService ?? throw new ArgumentNullException(nameof(randomService)); }
public EvenOrOdd(IRandomNumber randomNumber) { _randomNumber = randomNumber; }
public CaptchaService() { this.random = new RandomNumber(); }
public void SetUp() { randomNumber = new RandomNumber(); playerBuilder = new PlayerBuilder(randomNumber); }
/// <summary> /// Initialise une nouvelle instance de la classes <see cref="BaseGenerator"/> /// </summary> /// <param name="rnd">Le générateur aléatoire</param> public BaseGenerator(IRandomNumber rnd) { EnsureArg.IsNotNull(rnd, nameof(rnd)); this.random = rnd; }