Changeset 1607
- Timestamp:
- 04/18/09 14:41:05 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization.Test/3.2/LineChartTests.cs
r1530 r1607 37 37 row2.Style = DrawingStyle.Solid; 38 38 row3.Style = DrawingStyle.Dashed; 39 39 40 40 41 41 model.AddDataRow(row1); … … 63 63 64 64 for (int i = 0; i < 10000; i++) { 65 row1.AddValue(rand.NextDouble() *10);66 row2.AddValue(rand.NextDouble() *10);67 row3.AddValue(rand.NextDouble() *10);68 } 69 70 f.ShowDialog(); 71 } 72 65 row1.AddValue(rand.NextDouble() * 10); 66 row2.AddValue(rand.NextDouble() * 10); 67 row3.AddValue(rand.NextDouble() * 10); 68 } 69 70 f.ShowDialog(); 71 } 72 73 73 [Test] 74 74 public void TestAxes() { … … 119 119 120 120 for (int i = 0; i < 10; i++) { 121 row1.AddValue(rand.NextDouble() *10);122 row2.AddValue(rand.NextDouble() *10);123 row3.AddValue(rand.NextDouble() *1);121 row1.AddValue(rand.NextDouble() * 10); 122 row2.AddValue(rand.NextDouble() * 10); 123 row3.AddValue(rand.NextDouble() * 1); 124 124 } 125 125 126 126 f.AddValue += delegate { 127 row1.AddValue(rand.NextDouble() *10);128 row2.AddValue(rand.NextDouble() *10);129 row3.AddValue(rand.NextDouble() *1);127 row1.AddValue(rand.NextDouble() * 10); 128 row2.AddValue(rand.NextDouble() * 10); 129 row3.AddValue(rand.NextDouble() * 1); 130 130 }; 131 131 … … 134 134 135 135 [Test] 136 public void TestAggregator() { 137 LineChartTestForm f = new LineChartTestForm(model); 138 139 IDataRow row1 = new DataRow(); 140 row1.Label = "row"; 141 row1.Color = Color.Red; 142 row1.Thickness = 3; 143 row1.Style = DrawingStyle.Solid; 136 public void SimpleTestAggregator() { 137 LineChartTestForm f = new LineChartTestForm(model); 138 139 IDataRow row1 = new DataRow { Label = "row", Color = Color.Red, Thickness = 3, Style = DrawingStyle.Solid }; 144 140 145 141 model.AddDataRow(row1); 146 142 147 143 148 MinAggregator aggregator = new MinAggregator(); 149 aggregator.Label = "MinAggregator"; 150 aggregator.Color = Color.Pink; 151 aggregator.Thickness = 5; 152 aggregator.Style = DrawingStyle.Solid; 153 aggregator.AddValue(2); 154 aggregator.LineType = DataRowType.SingleValue; 155 156 IDataRow lineTest = new DataRow("testline"); 157 lineTest.Color = Color.DarkSalmon; 158 lineTest.Thickness = 2; 159 lineTest.Style = DrawingStyle.Dashed; 160 lineTest.LineType = DataRowType.SingleValue; 161 model.AddDataRow(lineTest); 162 lineTest.AddValue(9); 163 lineTest.AddValue(2); 164 lineTest.AddValue(3); 165 lineTest.AddValue(4); 166 144 MaxAggregator aggregator = new MaxAggregator { 145 Label = "MinAggregator", 146 Color = Color.Pink, 147 Thickness = 5, 148 Style = DrawingStyle.Solid, 149 LineType = DataRowType.SingleValue 150 }; 167 151 aggregator.AddWatch(row1); 168 152 169 153 model.AddDataRow(aggregator); 170 171 154 172 155 row1.AddValue(10); … … 183 166 public class Worker { 184 167 // This method will be called when the thread is started. 185 private ChartDataRowsModel model; 168 private readonly ChartDataRowsModel model; 169 186 170 public Worker(ChartDataRowsModel model) { 187 171 this.model = model; 188 172 } 189 173 190 174 public void DoWorkMultiLine() { 191 192 IDataRow row1 = new DataRow(); 193 row1.Color = Color.Red; 194 row1.Thickness = 2; 195 row1.Label = "Sinus"; 196 row1.Style = DrawingStyle.Solid; 175 IDataRow row1 = new DataRow { Color = Color.Red, Thickness = 2, Label = "Sinus", Style = DrawingStyle.Solid, ShowMarkers = false }; 197 176 model.AddDataRow(row1); 198 177 199 IDataRow row2 = new DataRow(); 200 row2.Color = Color.Red; 201 row2.Thickness = 3; 202 row2.Label = "Growing"; 203 row2.Style = DrawingStyle.Solid; 178 IDataRow row2 = new DataRow { Color = Color.Red, Thickness = 3, Label = "Growing", Style = DrawingStyle.Solid, ShowMarkers = false }; 204 179 model.AddDataRow(row2); 205 180 206 AvgAggregator multiAvgAggregator = new AvgAggregator(); 207 multiAvgAggregator.Label = "MultiAvgAggregator"; 208 multiAvgAggregator.Color = Color.DarkOliveGreen; 209 multiAvgAggregator.Thickness = 3; 210 multiAvgAggregator.Style = DrawingStyle.Solid; 211 multiAvgAggregator.LineType = DataRowType.SingleValue; 181 AvgAggregator multiAvgAggregator = new AvgAggregator { 182 Label = "MultiAvgAggregator", 183 Color = Color.DarkOliveGreen, 184 Thickness = 3, 185 Style = DrawingStyle.Solid, 186 LineType = DataRowType.SingleValue, 187 ShowMarkers = false 188 }; 212 189 multiAvgAggregator.AddWatch(row1); 213 190 multiAvgAggregator.AddWatch(row2); 214 191 model.AddDataRow(multiAvgAggregator); 215 192 216 MaxAggregator multiMaxAggregator = new MaxAggregator(); 217 multiMaxAggregator.Label = "MultiMaxAggregator"; 218 multiMaxAggregator.Color = Color.DarkKhaki; 219 multiMaxAggregator.Thickness = 3; 220 multiMaxAggregator.Style = DrawingStyle.Solid; 221 multiMaxAggregator.LineType = DataRowType.SingleValue; 193 MaxAggregator multiMaxAggregator = new MaxAggregator { 194 Label = "MultiMaxAggregator", 195 Color = Color.DarkKhaki, 196 Thickness = 3, 197 Style = DrawingStyle.Solid, 198 LineType = DataRowType.SingleValue, 199 ShowMarkers = false 200 }; 222 201 multiMaxAggregator.AddWatch(row1); 223 202 multiMaxAggregator.AddWatch(row2); 224 203 model.AddDataRow(multiMaxAggregator); 225 204 226 MinAggregator multiMinAggregator = new MinAggregator(); 227 multiMinAggregator.Label = "MultiMinAggregator"; 228 multiMinAggregator.Color = Color.DarkRed; 229 multiMinAggregator.Thickness = 3; 230 multiMinAggregator.Style = DrawingStyle.Solid; 231 multiMinAggregator.LineType = DataRowType.SingleValue; 205 MinAggregator multiMinAggregator = new MinAggregator { 206 Label = "MultiMinAggregator", 207 Color = Color.DarkRed, 208 Thickness = 3, 209 Style = DrawingStyle.Solid, 210 LineType = DataRowType.SingleValue, 211 ShowMarkers = false 212 }; 232 213 multiMinAggregator.AddWatch(row1); 233 214 multiMinAggregator.AddWatch(row2); 234 215 model.AddDataRow(multiMinAggregator); 235 216 236 AvgLineAggregator multiLineAvgAggregator = new AvgLineAggregator(); 237 multiLineAvgAggregator.Label = "MultiLineAvgAggregator"; 238 multiLineAvgAggregator.Color = Color.Red; 239 multiLineAvgAggregator.Thickness = 4; 240 multiLineAvgAggregator.Style = DrawingStyle.Solid; 241 multiLineAvgAggregator.LineType = DataRowType.Normal; 242 multiLineAvgAggregator.AddWatch(row1); 243 multiLineAvgAggregator.AddWatch(row2); 244 multiLineAvgAggregator.AddValue(0); 245 model.AddDataRow(multiLineAvgAggregator); 217 // AvgLineAggregator multiLineAvgAggregator = new AvgLineAggregator { 218 // Label = "MultiLineAvgAggregator", 219 // Color = Color.Red, 220 // Thickness = 4, 221 // Style = DrawingStyle.Solid, 222 // LineType = DataRowType.Normal, 223 // ShowMarkers = false 224 // }; 225 // multiLineAvgAggregator.AddWatch(row1); 226 // multiLineAvgAggregator.AddWatch(row2); 227 // multiLineAvgAggregator.AddValue(0); 228 // model.AddDataRow(multiLineAvgAggregator); 246 229 247 230 double i = 0; 248 double newY; 249 250 Random rand = new Random(); 231 232 251 233 while (!_shouldStop && i <= 24) { 252 234 i += 0.2; 253 newY = Math.Sin(i); 254 System.Console.WriteLine("working"); 255 //row1.AddValue(rand.NextDouble() * 10); 256 row1.AddValue(newY * 10); 257 row2.AddValue(i*2-15); 258 System.Threading.Thread.Sleep(100); 259 } 260 Console.WriteLine("worker thread: terminating gracefully."); 261 } 262 public void DoWorkSingleLine() { 263 264 IDataRow row1 = new DataRow(); 265 row1.Color = Color.Red; 266 row1.Thickness = 2; 267 row1.Label = "Sinus"; 268 row1.Style = DrawingStyle.Solid; 269 model.AddDataRow(row1); 270 271 IDataRow row2 = new DataRow(); 272 row2.Color = Color.Red; 273 row2.Thickness = 3; 274 row2.Label = "Growing"; 275 row2.Style = DrawingStyle.Solid; 276 model.AddDataRow(row2); 277 278 MinAggregator aggregator = new MinAggregator(); 279 aggregator.Label = "MinAggregator"; 280 aggregator.Color = Color.Pink; 281 aggregator.Thickness = 3; 282 aggregator.Style = DrawingStyle.Solid; 283 aggregator.LineType = DataRowType.SingleValue; 284 aggregator.AddWatch(row1); 285 model.AddDataRow(aggregator); 286 287 MaxAggregator maxAggregator = new MaxAggregator(); 288 maxAggregator.Label = "MaxAggregator"; 289 maxAggregator.Color = Color.DeepSkyBlue; 290 maxAggregator.Thickness = 3; 291 maxAggregator.Style = DrawingStyle.Solid; 292 maxAggregator.LineType = DataRowType.SingleValue; 293 maxAggregator.AddWatch(row1); 294 model.AddDataRow(maxAggregator); 295 296 AvgAggregator avgAggregator = new AvgAggregator(); 297 avgAggregator.Label = "AvgAggregator"; 298 avgAggregator.Color = Color.Violet; 299 avgAggregator.Thickness = 3; 300 avgAggregator.Style = DrawingStyle.Solid; 301 avgAggregator.LineType = DataRowType.SingleValue; 302 avgAggregator.AddWatch(row1); 303 model.AddDataRow(avgAggregator); 304 305 double i = 0; 306 double newY; 307 308 Random rand = new Random(); 309 while (!_shouldStop && i <= 24) { 310 i += 0.2; 311 newY = Math.Sin(i); 312 System.Console.WriteLine("working"); 235 double newY = Math.Sin(i); 236 Console.WriteLine("working"); 313 237 //row1.AddValue(rand.NextDouble() * 10); 314 238 row1.AddValue(newY * 10); 315 239 row2.AddValue(i * 2 - 15); 316 System.Threading.Thread.Sleep(100);240 Thread.Sleep(100); 317 241 } 318 242 Console.WriteLine("worker thread: terminating gracefully."); 319 243 } 244 245 public void DoWorkSingleLine() { 246 IDataRow row1 = new DataRow { 247 Color = Color.Red, 248 Thickness = 2, 249 Label = "Sinus", 250 Style = DrawingStyle.Solid, 251 ShowMarkers = false 252 }; 253 model.AddDataRow(row1); 254 255 IDataRow row2 = new DataRow { 256 Color = Color.Red, 257 Thickness = 3, 258 Label = "Growing", 259 Style = DrawingStyle.Solid, 260 ShowMarkers = false 261 }; 262 model.AddDataRow(row2); 263 264 MinAggregator aggregator = new MinAggregator { 265 Label = "MinAggregator", 266 Color = Color.Pink, 267 Thickness = 3, 268 Style = DrawingStyle.Solid, 269 LineType = DataRowType.SingleValue 270 }; 271 aggregator.AddWatch(row1); 272 model.AddDataRow(aggregator); 273 274 MaxAggregator maxAggregator = new MaxAggregator { 275 Label = "MaxAggregator", 276 Color = Color.DeepSkyBlue, 277 Thickness = 3, 278 Style = DrawingStyle.Solid, 279 LineType = DataRowType.SingleValue 280 }; 281 maxAggregator.AddWatch(row1); 282 model.AddDataRow(maxAggregator); 283 284 AvgAggregator avgAggregator = new AvgAggregator { 285 Label = "AvgAggregator", 286 Color = Color.Violet, 287 Thickness = 3, 288 Style = DrawingStyle.Solid, 289 LineType = DataRowType.SingleValue 290 }; 291 avgAggregator.AddWatch(row1); 292 model.AddDataRow(avgAggregator); 293 294 double i = 0; 295 296 297 while (!_shouldStop && i <= 240) { 298 i += 0.2; 299 double newY = Math.Sin(i); 300 Console.WriteLine("working"); 301 //row1.AddValue(rand.NextDouble() * 10); 302 row1.AddValue(newY * 10); 303 row2.AddValue(i * 2 - 15); 304 //System.Threading.Thread.Sleep(100); 305 } 306 Console.WriteLine("worker thread: terminating gracefully."); 307 } 308 320 309 public void DoWorkAvgLine() { 321 322 IDataRow row1 = new DataRow(); 323 row1.Color = Color.Red; 324 row1.Thickness = 2; 325 row1.Label = "Sinus"; 326 row1.Style = DrawingStyle.Solid; 310 IDataRow row1 = new DataRow { 311 Color = Color.Red, 312 Thickness = 2, 313 Label = "Sinus", 314 Style = DrawingStyle.Solid, 315 ShowMarkers = false 316 }; 327 317 model.AddDataRow(row1); 328 318 329 IDataRow row2 = new DataRow(); 330 row2.Color = Color.Red; 331 row2.Thickness = 3; 332 row2.Label = "Growing"; 333 row2.Style = DrawingStyle.Solid; 319 IDataRow row2 = new DataRow { 320 Color = Color.Red, 321 Thickness = 3, 322 Label = "Growing", 323 Style = DrawingStyle.Solid, 324 ShowMarkers = false 325 }; 334 326 model.AddDataRow(row2); 335 327 336 AvgLineAggregator avgLineAggregator = new AvgLineAggregator(); 337 avgLineAggregator.Label = "AvgLineAggregator"; 338 avgLineAggregator.Color = Color.Violet; 339 avgLineAggregator.Thickness = 3; 340 avgLineAggregator.Style = DrawingStyle.Solid; 341 avgLineAggregator.LineType = DataRowType.Normal; 328 AvgLineAggregator avgLineAggregator = new AvgLineAggregator { 329 Label = "AvgLineAggregator", 330 Color = Color.Violet, 331 Thickness = 3, 332 Style = DrawingStyle.Solid, 333 LineType = DataRowType.Normal, 334 ShowMarkers = false 335 }; 342 336 avgLineAggregator.AddWatch(row1); 343 337 avgLineAggregator.AddWatch(row2); … … 345 339 346 340 double i = 0; 347 double newY; 348 349 Random rand = new Random(); 350 while (!_shouldStop && i <= 24) { 341 342 while (!_shouldStop && i <= 240) { 351 343 i += 0.2; 352 newY = Math.Sin(i);353 System.Console.WriteLine("working");344 double newY = Math.Sin(i); 345 Console.WriteLine("working"); 354 346 //row1.AddValue(rand.NextDouble() * 10); 355 347 row1.AddValue(newY * 10); 356 348 row2.AddValue(i * 2 - 15); 357 System.Threading.Thread.Sleep(100);349 //Thread.Sleep(100); 358 350 } 359 351 Console.WriteLine("worker thread: terminating gracefully."); 360 352 } 353 354 public void DoWorkFloatingAvg() { 355 IDataRow row1 = new DataRow { 356 Color = Color.Red, 357 Thickness = 2, 358 Label = "SinusHacked", 359 Style = DrawingStyle.Solid, 360 ShowMarkers = false 361 }; 362 model.AddDataRow(row1); 363 364 IDataRow row2 = new DataRow { 365 Color = Color.Red, 366 Thickness = 3, 367 Label = "GrowingHacked", 368 Style = DrawingStyle.Solid, 369 ShowMarkers = false 370 }; 371 model.AddDataRow(row2); 372 373 // insert 2 floating avg line aggregators (for each hacked line) 374 375 // test floating avg aggregator without visible watcher line 376 377 double i = 0; 378 Random rnd = new Random(); 379 380 while (!_shouldStop && i <= 240) { 381 i += 0.2; 382 double newY = Math.Sin(i); 383 384 double hack = rnd.NextDouble() * i / 10; 385 row1.AddValue(newY * 10 + hack); 386 387 hack = rnd.NextDouble() * i / 10; 388 row2.AddValue(i * 2 - 15 + hack); 389 //Thread.Sleep(100); 390 } 391 Console.WriteLine("worker thread: terminating gracefully."); 392 } 393 361 394 public void RequestStop() { 362 395 _shouldStop = true; 363 396 } 397 364 398 // Volatile is used as hint to the compiler that this data 365 399 // member will be accessed by multiple threads. … … 386 420 public void TestAggregatorSingleLine() { 387 421 LineChartTestForm f = new LineChartTestForm(model); 388 422 model.Title = "SingleLineAggregator Tests"; 423 389 424 // Create the thread object. This does not start the thread. 390 425 Worker workerObject = new Worker(model); … … 397 432 workerObject.RequestStop(); 398 433 } 434 399 435 [Test] 400 436 public void TestAggregatorAvgLine() { 401 437 LineChartTestForm f = new LineChartTestForm(model); 438 model.Title = "AvgLineTest"; 402 439 403 440 // Create the thread object. This does not start the thread. … … 412 449 } 413 450 414 451 [Test] 452 public void TestFloatingAvg() { 453 LineChartTestForm f = new LineChartTestForm(model); 454 model.Title = "FloatingAvg Test"; 455 model.ViewSettings.LegendPosition = Legend.LegendPosition.Top; 456 457 // Create the thread object. This does not start the thread. 458 Worker workerObject = new Worker(model); 459 Thread workerThread = new Thread(workerObject.DoWorkFloatingAvg); 460 461 // Start the worker thread. 462 workerThread.Start(); 463 464 f.ShowDialog(); 465 workerObject.RequestStop(); 466 } 467 415 468 416 469 [Test] 417 470 public void TestAutoZoomInConstructor() { 418 IDataRow row1 = new DataRow(); 419 420 row1.Color = Color.Red; 421 row1.Thickness = 3; 422 row1.Style = DrawingStyle.Solid; 471 IDataRow row1 = new DataRow { Color = Color.Red, Thickness = 3, Style = DrawingStyle.Solid }; 423 472 424 473 model.AddDataRow(row1); … … 485 534 486 535 row2.AddValue(5); 487 536 488 537 489 538 row3.AddValue(2); -
trunk/sources/HeuristicLab.Visualization/3.2/AvgAggregator.cs
r1605 r1607 22 22 #endregion 23 23 24 private List<IDataRow> dataRowWatches = new List<IDataRow>();24 private readonly List<IDataRow> dataRowWatches = new List<IDataRow>(); 25 25 private double curAvgValue; 26 26 … … 126 126 } 127 127 128 public override void RemoveValues(int index, int count ) {128 public override void RemoveValues(int index, int countVals) { 129 129 throw new NotSupportedException(); 130 130 } -
trunk/sources/HeuristicLab.Visualization/3.2/AvgLineAggregator.cs
r1605 r1607 6 6 7 7 private readonly List<double> dataRow = new List<double>(); 8 readonly List<IDataRow> dataRowWatches = new List<IDataRow>(); 8 9 9 10 #region IAggregator Members 10 11 11 public void AddWatch(IDataRow dataRow) {12 dataRowWatches.Add( dataRow);13 dataRow.ValueChanged += dataRow_ValueChanged;14 dataRow.ValuesChanged += dataRow_ValuesChanged;15 dataRow.DataRowChanged += dataRow_DataRowChanged;12 public void AddWatch(IDataRow watchDataRow) { 13 dataRowWatches.Add(watchDataRow); 14 watchDataRow.ValueChanged += dataRow_ValueChanged; 15 watchDataRow.ValuesChanged += dataRow_ValuesChanged; 16 watchDataRow.DataRowChanged += dataRow_DataRowChanged; 16 17 } 17 18 18 public void RemoveWatch(IDataRow dataRow) { 19 20 dataRowWatches.Remove(dataRow); 21 dataRow.DataRowChanged -= dataRow_DataRowChanged; 22 dataRow.ValuesChanged -= dataRow_ValuesChanged; 23 dataRow.ValueChanged -= dataRow_ValueChanged; 19 public void RemoveWatch(IDataRow watchDataRow) { 20 dataRowWatches.Remove(watchDataRow); 21 watchDataRow.DataRowChanged -= dataRow_DataRowChanged; 22 watchDataRow.ValuesChanged -= dataRow_ValuesChanged; 23 watchDataRow.ValueChanged -= dataRow_ValueChanged; 24 24 } 25 25 26 27 26 #endregion 28 29 List<IDataRow> dataRowWatches = new List<IDataRow>();30 27 31 28 void dataRow_ValueChanged(IDataRow row, double value, int index, Action action) { 32 29 switch (action) { 33 30 case Action.Added: 34 refresh Value(row, value, Action.Added);31 refreshLastValues(row); 35 32 break; 36 33 case Action.Modified: … … 38 35 break; 39 36 case Action.Deleted: 40 refresh Value(row, value, Action.Deleted);37 refreshLastValues(row); 41 38 break; 42 39 default: 43 40 throw new ArgumentOutOfRangeException("action"); 44 41 } 45 46 42 } 47 43 … … 57 53 58 54 private void refreshValue() { 59 double tmpSum = 0;55 60 56 int count = dataRowWatches.Count; 61 57 62 58 IDataRow firstRow = dataRowWatches[0]; 63 59 int count1 = firstRow.Count; 64 System.Console.WriteLine("count: " + count1);60 Console.WriteLine("count: " + count1); 65 61 66 62 dataRow.Clear(); … … 68 64 if (dataRowWatches.Count >= 2) { 69 65 for (int i = 0; i < count1; i++) { 70 tmpSum = 0;66 double tmpSum = 0; 71 67 for (int j = 0; j < count; j++) { 72 68 if (dataRowWatches[j].Count > i) { … … 75 71 } 76 72 77 this.dataRow.Add(tmpSum / count);73 dataRow.Add(tmpSum / count); 78 74 OnValueChanged(tmpSum / count, dataRow.Count - 1, Action.Added); 79 75 } … … 81 77 } 82 78 83 private void refresh Value(IDataRow row, double newVal, Action action) {79 private void refreshLastValues(IDataRow row) { 84 80 85 81 int index = row.Count - 1; 86 87 88 89 90 82 double curAvg = 0; 91 // if (dataRow.Count > 0) {92 // curAvg = dataRow[0]; //?93 // } else {94 // curAvg = 0;95 // }96 97 83 98 84 foreach (IDataRow watch in dataRowWatches) { 99 85 if (watch.Count >= index +1) { 100 curAvg += watch[index]; 101 86 curAvg += watch[index]; 102 87 } 103 //curAvg += watch[watch.Count - 1];104 88 } 105 89 … … 116 100 OnValueChanged(curAvg, dataRow.Count - 1, Action.Modified); 117 101 } 118 119 120 121 // curAvg *= dataRow.Count * dataRowWatches.Count;122 // switch (action) {123 // case Action.Added:124 // curAvg += newVal;125 // break;126 // case Action.Modified:127 // throw new InvalidOperationException();128 // case Action.Deleted:129 // curAvg -= newVal;130 // break;131 // default:132 // throw new ArgumentOutOfRangeException("action");133 // }134 //135 // dataRow.Add((curAvg / (dataRow.Count + 1)) / dataRowWatches.Count);136 // OnValueChanged((curAvg / (dataRow.Count + 1)) / dataRowWatches.Count, dataRow.Count - 1, Action.Added); // nicht immer adden!137 138 // double tmpSum = 0;139 // int count = dataRowWatches.Count;140 //141 // IDataRow firstRow = dataRowWatches[0];142 // int count1 = firstRow.Count;143 // System.Console.WriteLine("count: " + count1);144 //145 // dataRow.Clear();146 //147 // if (dataRowWatches.Count >= 2) {148 // for (int i = 0; i < count1; i++) {149 // tmpSum = 0;150 // for (int j = 0; j < count; j++) {151 // if (dataRowWatches[j].Count > i) {152 // tmpSum += dataRowWatches[j][i];153 // }154 // }155 //156 // this.dataRow.Add(tmpSum/count);157 // OnValueChanged(tmpSum / count, dataRow.Count - 1, Action.Added);158 // }159 // }160 161 // evtl nur feuern wenn sich geändert hat (jedes mal?)162 //OnDataRowChanged(this);163 102 } 164 103 … … 171 110 172 111 public override void AddValue(double value, int index) { 173 throw new Not ImplementedException();112 throw new NotSupportedException(); 174 113 } 175 114 … … 194 133 } 195 134 196 public override void RemoveValues(int index, int count ) {135 public override void RemoveValues(int index, int countVals) { 197 136 throw new NotSupportedException(); 198 137 } … … 210 149 } 211 150 212 // TODO calculate min value213 151 public override double MinValue { 214 152 get { return 0; } 215 153 } 216 154 217 // TODO calculate max value218 155 public override double MaxValue { 219 156 get { return 0; } -
trunk/sources/HeuristicLab.Visualization/3.2/MaxAggregator.cs
r1530 r1607 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Drawing;4 3 5 4 namespace HeuristicLab.Visualization {
Note: See TracChangeset
for help on using the changeset viewer.