コード例 #1
0
ファイル: DataRow.cs プロジェクト: liujiandu/HeuristicLab
 private void AfterDeserialization()
 {
     if (VisualProperties == null)
     {
         VisualProperties = new DataRowVisualProperties();
     }
 }
コード例 #2
0
ファイル: DataRow.cs プロジェクト: liujiandu/HeuristicLab
 public DataRow(string name)
     : base(name)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentException("Name of a DataRow cannot be empty", name);
     }
     VisualProperties = new DataRowVisualProperties(name);
     values           = new ObservableList <double>();
 }
コード例 #3
0
ファイル: DataRow.cs プロジェクト: liujiandu/HeuristicLab
 public DataRow(string name, string description, IEnumerable <double> values)
     : base(name, description)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentException("Name of a DataRow cannot be empty", name);
     }
     VisualProperties = new DataRowVisualProperties(name);
     this.values      = new ObservableList <double>(values);
 }
コード例 #4
0
 protected DataRowVisualProperties(DataRowVisualProperties original, Cloner cloner)
     : base(original, cloner)
 {
     this.chartType         = original.chartType;
     this.secondYAxis       = original.secondYAxis;
     this.secondXAxis       = original.secondXAxis;
     this.color             = original.color;
     this.lineStyle         = original.lineStyle;
     this.startIndexZero    = original.startIndexZero;
     this.lineWidth         = original.lineWidth;
     this.scaleFactor       = original.scaleFactor;
     this.displayName       = original.displayName;
     this.isVisibleInLegend = original.isVisibleInLegend;
 }
コード例 #5
0
    public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {

      IDictionary<int, IList<int>> selection = PreprocessingData.Selection;
      int variableIndex = PreprocessingData.GetColumnIndex(variableName);

      if (selection.Keys.Contains(variableIndex)) {
        List<int> selectedIndices = new List<int>(selection[variableIndex]);
        //need selection with more than 1 value
        if (selectedIndices.Count < 2)
          return null;

        selectedIndices.Sort();
        int start = selectedIndices[0];
        int end = selectedIndices[selectedIndices.Count - 1];

        DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType);
        return rowSelect;
      } else
        return null;
    }
コード例 #6
0
 private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) {
   switch (dataRowLineStyle) {
     case DataRowVisualProperties.DataRowLineStyle.Dash:
       return ChartDashStyle.Dash;
     case DataRowVisualProperties.DataRowLineStyle.DashDot:
       return ChartDashStyle.DashDot;
     case DataRowVisualProperties.DataRowLineStyle.DashDotDot:
       return ChartDashStyle.DashDotDot;
     case DataRowVisualProperties.DataRowLineStyle.Dot:
       return ChartDashStyle.Dot;
     case DataRowVisualProperties.DataRowLineStyle.NotSet:
       return ChartDashStyle.NotSet;
     case DataRowVisualProperties.DataRowLineStyle.Solid:
       return ChartDashStyle.Solid;
     default:
       return ChartDashStyle.NotSet;
   }
 }
コード例 #7
0
 protected DataRowVisualProperties(DataRowVisualProperties original, Cloner cloner)
   : base(original, cloner) {
   this.chartType = original.chartType;
   this.secondYAxis = original.secondYAxis;
   this.secondXAxis = original.secondXAxis;
   this.color = original.color;
   this.lineStyle = original.lineStyle;
   this.startIndexZero = original.startIndexZero;
   this.lineWidth = original.lineWidth;
   this.bins = original.bins;
   this.exactBins = original.exactBins;
   this.scaleFactor = original.scaleFactor;
   this.displayName = original.displayName;
   this.isVisibleInLegend = original.isVisibleInLegend;
 }
コード例 #8
0
 public IndexedDataRow(string name, string description)
     : base(name, description)
 {
     values           = new ObservableList <Tuple <T, double> >();
     VisualProperties = new DataRowVisualProperties(name);
 }
コード例 #9
0
 public IndexedDataRow()
 {
     values           = new ObservableList <Tuple <T, double> >();
     VisualProperties = new DataRowVisualProperties();
 }
コード例 #10
0
 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
   IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));
   DataRow row = new DataRow(variableName, "", values);
   row.VisualProperties.ChartType = chartType;
   return row;
 }
コード例 #11
0
 public List<DataRow> CreateAllDataRows(DataRowVisualProperties.DataRowChartType chartType) {
   List<DataRow> dataRows = new List<DataRow>();
   foreach (var name in PreprocessingData.GetDoubleVariableNames())
     dataRows.Add(CreateDataRow(name, chartType));
   return dataRows;
 }
コード例 #12
0
 public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) {
   List<DataRow> dataRows = new List<DataRow>();
   foreach (var name in PreprocessingData.GetDoubleVariableNames()) {
     DataRow row = CreateSelectedDataRow(name, chartType);
     if (row != null)
       dataRows.Add(row);
   }
   return dataRows;
 }
コード例 #13
0
    public DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType) {
      IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));
      IList<double> valuesRange = new List<double>();
      for (int i = 0; i < values.Count; i++) {
        if (i >= start && i <= end)
          valuesRange.Add(values[i]);
        else
          valuesRange.Add(Double.NaN);
      }

      DataRow row = new DataRow(variableName, "", valuesRange);
      row.VisualProperties.ChartType = chartType;
      return row;
    }
コード例 #14
0
ファイル: DataRow.cs プロジェクト: t-h-e/HeuristicLab
 public DataRow(string name, string description, IEnumerable<double> values)
   : base(name, description) {
   if (string.IsNullOrEmpty(name)) throw new ArgumentException("Name of a DataRow cannot be empty", name);
   VisualProperties = new DataRowVisualProperties(name);
   this.values = new ObservableList<double>(values);
 }
コード例 #15
0
ファイル: DataRow.cs プロジェクト: t-h-e/HeuristicLab
 public DataRow(string name)
   : base(name) {
   if (string.IsNullOrEmpty(name)) throw new ArgumentException("Name of a DataRow cannot be empty", name);
   VisualProperties = new DataRowVisualProperties(name);
   values = new ObservableList<double>();
 }
コード例 #16
0
ファイル: DataRow.cs プロジェクト: t-h-e/HeuristicLab
 private void AfterDeserialization() {
   if (VisualProperties == null) VisualProperties = new DataRowVisualProperties();
 }