public CooldownsUpdaterSystem(CannonCooldownsController cannonCooldownsController, IApproximator <float> cannonCooldownApproximator) { if (cannonCooldownsController == null) { throw new Exception($"{nameof(CooldownsUpdaterSystem)} {nameof(cannonCooldownsController)} was null"); } approximator = cannonCooldownApproximator; _cannonCooldownsController = cannonCooldownsController; weaponInfos = new WeaponInfo[0]; cooldowns = new float[0]; }
public AbilityUpdaterSystem(CooldownInfo abilityCooldownInfo, IApproximator <float> abilityCooldownApproximator) { if (abilityCooldownInfo == null) { throw new NullReferenceException($"{nameof(AbilityUpdaterSystem)} {nameof(abilityCooldownInfo)} was null"); } approximator = abilityCooldownApproximator; approximator.Set(new Dictionary <ushort, float> { { 0, float.PositiveInfinity } }, Time.time - Time.deltaTime); approximator.Set(new Dictionary <ushort, float> { { 0, float.PositiveInfinity } }, Time.time); _cooldownInfo = abilityCooldownInfo; }
public TimeSpeedSystem(Contexts contexts, IApproximator <float> timeApproximator) { gameContext = contexts.game; _lastMessageId = 0; WasChanged = false; approximator = timeApproximator; _serverDeltaTime = ServerTimeConstants.MinDeltaTime; defaultFixedDeltaTime = Time.fixedDeltaTime; approximator.Set(new Dictionary <ushort, float>(1) { { 0, ServerTimeConstants.MinDeltaTime } }, Time.time - Time.deltaTime); approximator.Set(new Dictionary <ushort, float>(1) { { 0, ServerTimeConstants.MinDeltaTime } }, Time.time); }
/// <summary> /// Создание экземпляра класса <see cref="TextRecognizer"/>. /// </summary> public TextRecognizer( IApproximator approximator, EulerContainer container, IFragmentAnalyzer analyzer, IScanner scanner) { if (approximator == null) { throw new ArgumentNullException(nameof(approximator)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } _approximator = approximator; _analyzer = analyzer ?? new DefaultFragmentAnalyzer(container); _scanner = scanner ?? new DefaultScanner(); }
//readonly IGroup<GameEntity> gameEntitiesGroup; public UpdateRadiusSystem(Contexts contexts, IApproximator <float> radiusApproximator) { gameContext = contexts.game; approximator = radiusApproximator; //gameEntitiesGroup = gameContext.GetGroup(GameMatcher.Circle); }
/// <summary> /// Создание экземпляра класса <see cref="TextRecognizer"/>. /// </summary> public TextRecognizer(EulerContainer container, IApproximator approximator) : this(approximator, container, null, null) { }
private void startApproximateButton_Click(object sender, EventArgs e) { if (approximator == null) { approximator = new LeastSquareMethod(); } int selectionSize = 1000; int order = 6; ISelection selection = generateSourceSelection(selectionSize, sinWithNoiseFunc2D); drawSeries(approximateChart.Series[0], selection); Polynomial polynomial = approximator.Approximate(selection, order); ISelection app_selection = polynomial.GetSelectionFromRange(0, selectionSize, selectionSize/100); drawSeries(approximateChart.Series[1], app_selection); }
public RQlearning(double Epsilon, double DiscountFactor, IApproximator Qfunc) { this.Epsilon = Epsilon; this.DiscountFactor = DiscountFactor; this.Qfunc = Qfunc; }