// ---------------------------------------------------------------------------------------- #region BaseObject protected override void CopyFrom(object o) { base.CopyFrom(o); WorldSettings value = o as WorldSettings ?? throw new InvalidTypeException(o, nameof(WorldSettings), 801331); BiasMagnitude = value.BiasMagnitude; WeightMagnitude = value.WeightMagnitude; MaxIter = value.MaxIter; Epsilon = value.Epsilon; Tolerance = value.Tolerance; CostFunction = value.CostFunction; TrainingSampleCount = value.TrainingSampleCount; LearningRate = value.LearningRate; MomentumCoefficient = value.MomentumCoefficient; Lambda = value.Lambda; TestSampleCount = value.TestSampleCount; }
public void Run(WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource) { Stopwatch timer = new Stopwatch(); timer.Start(); long ticks = timer.Elapsed.Ticks; while (true) { tokenSource?.Token.ThrowIfCancellationRequested(); long prevTicks = ticks; ticks = timer.Elapsed.Ticks; float dt = (float)(ticks - prevTicks) / TimeSpan.TicksPerSecond; Step(dt, settings, reporter, tokenSource); UpdateTransforms(); } }
public override void Step(float dt, WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource) { base.Step(dt, settings, reporter, tokenSource); }
public virtual void Step(float dt, WorldSettings settings, ProgressReporter reporter, CancellationTokenSource tokenSource) { Visual.Step(dt, settings, reporter, tokenSource); }