Changeset 8965 for trunk/sources
- Timestamp:
- 11/28/12 12:19:01 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r8962 r8965 73 73 RegisterEvents(); 74 74 if (Algorithm != null) RegisterAlgorithmEvents(); 75 if (Problem != null) Problem.Reset += (o, e) => OnProblemChanged(); 75 76 } 76 77 … … 521 522 private void RegisterEvents() { 522 523 Folds.ValueChanged += new EventHandler(Folds_ValueChanged); 523 SamplesStart.ValueChanged += new EventHandler(SamplesStart_ValueChanged);524 SamplesEnd.ValueChanged += new EventHandler(SamplesEnd_ValueChanged);525 524 RegisterClonedAlgorithmsEvents(); 526 525 } … … 530 529 } 531 530 532 private bool samplesChanged = false;533 private void SamplesStart_ValueChanged(object sender, EventArgs e) {534 samplesChanged = true;535 if (Problem != null) Problem.ProblemData.TrainingPartition.Start = SamplesStart.Value;536 samplesChanged = false;537 }538 private void SamplesEnd_ValueChanged(object sender, EventArgs e) {539 samplesChanged = true;540 if (Problem != null) Problem.ProblemData.TrainingPartition.End = SamplesEnd.Value;541 samplesChanged = false;542 }543 531 544 532 #region template algorithms events … … 571 559 EventHandler handler = ProblemChanged; 572 560 if (handler != null) handler(this, EventArgs.Empty); 573 if (samplesChanged) return;574 561 575 562 SamplesStart.Value = 0; … … 593 580 } else 594 581 SamplesEnd.Value = 0; 595 596 SamplesStart_ValueChanged(this, EventArgs.Empty);597 SamplesEnd_ValueChanged(this, EventArgs.Empty);598 582 } 599 583 … … 689 673 lock (locker) { 690 674 if (!stopPending && ExecutionState == ExecutionState.Started) { 691 IAlgorithm preparedAlgorithm = clonedAlgorithms. Where(alg => alg.ExecutionState == ExecutionState.Prepared ||692 alg.ExecutionState == ExecutionState.Paused).FirstOrDefault();675 IAlgorithm preparedAlgorithm = clonedAlgorithms.FirstOrDefault(alg => alg.ExecutionState == ExecutionState.Prepared || 676 alg.ExecutionState == ExecutionState.Paused); 693 677 if (preparedAlgorithm != null) preparedAlgorithm.Start(); 694 678 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r8936 r8965 357 357 Description = data.Description; 358 358 ProblemData = data; 359 OnReset();360 359 } 361 360 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs
r8798 r8965 102 102 Description = data.Description; 103 103 ProblemData = data; 104 OnReset();105 104 } 106 105 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs
r7259 r8965 73 73 74 74 public void Add(double x) { 75 if (double.IsNaN(x) || double.IsInfinity(x) || x > 1E13 || x < -1E13 ||(errorState & OnlineCalculatorError.InvalidValueAdded) > 0) {75 if (double.IsNaN(x) || double.IsInfinity(x) || (errorState & OnlineCalculatorError.InvalidValueAdded) > 0) { 76 76 errorState = errorState | OnlineCalculatorError.InvalidValueAdded; 77 77 varianceErrorState = errorState | OnlineCalculatorError.InvalidValueAdded;
Note: See TracChangeset
for help on using the changeset viewer.