- Timestamp:
- 10/17/08 10:54:57 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Logging
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Logging/PointXYChart.cs
r671 r677 29 29 namespace HeuristicLab.Logging { 30 30 public class PointXYChart : ItemBase, IVisualizationItem { 31 private ItemList <ItemList<DoubleArrayData>>myValues;32 public ItemList <ItemList<DoubleArrayData>>Values {31 private ItemList myValues; 32 public ItemList Values { 33 33 get { return myValues; } 34 34 set { … … 56 56 myConnectDots = new BoolData(true); 57 57 } 58 public PointXYChart(bool connectDots,ItemList <ItemList<DoubleArrayData>>values) {58 public PointXYChart(bool connectDots,ItemList values) { 59 59 myConnectDots = new BoolData(connectDots); 60 60 myValues = values; … … 63 63 public override object Clone(IDictionary<Guid, object> clonedObjects) { 64 64 PointXYChart clone = (PointXYChart)base.Clone(clonedObjects); 65 clone.myValues = (ItemList <ItemList<DoubleArrayData>>)Auxiliary.Clone(Values, clonedObjects);65 clone.myValues = (ItemList)Auxiliary.Clone(Values, clonedObjects); 66 66 return clone; 67 67 } … … 92 92 base.Populate(node, restoredObjects); 93 93 myConnectDots = (BoolData)PersistenceManager.Restore(node.SelectSingleNode("ConnectDots"), restoredObjects); 94 myValues = (ItemList <ItemList<DoubleArrayData>>)PersistenceManager.Restore(node.SelectSingleNode("Values"), restoredObjects);94 myValues = (ItemList)PersistenceManager.Restore(node.SelectSingleNode("Values"), restoredObjects); 95 95 } 96 96 #endregion -
trunk/sources/HeuristicLab.Logging/PointXYChartInjector.cs
r671 r677 38 38 AddVariableInfo(connectDotsInfo); 39 39 AddVariable(new Variable("ConnectDots", new BoolData(true))); 40 AddVariableInfo(new VariableInfo("Values", "Item list holding the values of the pointXYchart", typeof(ItemList <ItemList<DoubleArrayData>>), VariableKind.In));40 AddVariableInfo(new VariableInfo("Values", "Item list holding the values of the pointXYchart", typeof(ItemList), VariableKind.In)); 41 41 AddVariableInfo(new VariableInfo("PointXYchart", "Object representing a pointXYchart", typeof(PointXYChart), VariableKind.New | VariableKind.Out)); 42 42 } … … 44 44 public override IOperation Apply(IScope scope) { 45 45 bool connectDots = GetVariableValue<BoolData>("ConnectDots", scope, true).Data; 46 ItemList <ItemList<DoubleArrayData>> values = GetVariableValue<ItemList<ItemList<DoubleArrayData>>>("Values", scope, true);46 ItemList values = GetVariableValue<ItemList>("Values", scope, true); 47 47 PointXYChart pointXYchart = GetVariableValue<PointXYChart>("PointXYchart", scope, false, false); 48 48 if (pointXYchart == null) { -
trunk/sources/HeuristicLab.Logging/PointXYChartView.cs
r673 r677 99 99 100 100 for (int i = 0; i < PointXYChart.Values.Count; i++) { 101 ItemList <DoubleArrayData> list = (ItemList<DoubleArrayData>)PointXYChart.Values[i];101 ItemList list = (ItemList) PointXYChart.Values[i]; 102 102 for (int j = 0; j < list.Count; j++) { 103 double[] value = ((DoubleArrayData)list[j]).Data; 104 if (!double.IsInfinity(value[0]) && !double.IsNaN(value[0]) && !double.IsInfinity(value[1]) && !double.IsNaN(value[1])) { 105 if (value[0] < minX) minX = value[0]; 106 if (value[0] > maxX) maxX = value[0]; 107 if (value[1] < minY) minY = value[1]; 108 if (value[1] > maxY) maxY = value[1]; 103 ItemList value = ((ItemList)list[j]); 104 double x = ((DoubleData)value[0]).Data; 105 double y = ((DoubleData)value[1]).Data; 106 if (!double.IsInfinity(x) && !double.IsNaN(x) && !double.IsInfinity(y) && !double.IsNaN(y)) { 107 if (x < minX) minX = x; 108 if (x > maxX) maxX = x; 109 if (y < minY) minY = y; 110 if (y > maxY) maxY = y; 109 111 110 datachart.AddDataPoint(i, value[0], value[1]);112 datachart.AddDataPoint(i, x, y); 111 113 } 112 114 }
Note: See TracChangeset
for help on using the changeset viewer.