当前位置: 首页>>代码示例>>C#>>正文


C# ConstructGen.GetInnerData方法代码示例

本文整理汇总了C#中ConstructGen.GetInnerData方法的典型用法代码示例。如果您正苦于以下问题:C# ConstructGen.GetInnerData方法的具体用法?C# ConstructGen.GetInnerData怎么用?C# ConstructGen.GetInnerData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConstructGen的用法示例。


在下文中一共展示了ConstructGen.GetInnerData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: reloadBottomLeft

    private void reloadBottomLeft(IDictionary<string, DataEncapsValue> list)
    {
      if (list.Count == 0 || m_blArgs.Locked)
        return;

      ConstructGen<double> conBottomLeft = new ConstructGen<double>(list.Count);
      conBottomLeft.ColumnHeadings = new string[conBottomLeft.ArrayLength];
      int i = 0;
      foreach (string s in list.Keys)
      {
        conBottomLeft.ColumnHeadings[i] = s;
        DatedDataCollectionGen<double> coll = list[s].Data;

        DatedDataCollectionGen<double> monthly = coll.ToPeriod(m_blArgs.Period, m_blArgs.Collation);
        for (int j = 0; j < monthly.Length; ++j)
          conBottomLeft.SetValue(monthly.Dates[j], i, monthly.Data[j]);

        ++i;
      }
      conBottomLeft.SortKeys();

      StringBuilder titleBuilder = new StringBuilder();
      foreach (string s in list.Values.Select<DataEncapsValue, string>(x => x.Name).Distinct<string>())
        titleBuilder.Append(s).Append(" / ");
      titleBuilder.Length -= 3;
      lbl_BL_title.Text = titleBuilder.ToString();

      simpleWtsColumnChart2.Create<DateTime, string>(new SortedDictionary<DateTime, double[]>(conBottomLeft.GetInnerData()), conBottomLeft.ColumnHeadings, ExtensionMethods.FormatStringForPeriodicity(m_blArgs.Period));
      //simpleWtsColumnChart2.SetYAxisScaleRange(0d, double.MinValue);
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:30,代码来源:WtsAnalysisCompareControl.cs

示例2: getRollingVols

    private SortedDictionary<DateTime, double[]> getRollingVols()
    {
      int[] selIndexes = getSelectedIndixes();

      ConstructGen<double> cum = new ConstructGen<double>(selIndexes.Length);

      DateTime startDate = m_comp.GetDate(m_focus);
      for (int i = 0; i < cum.ArrayLength; ++i)
      {
        ReturnsEval.DataSeriesEvaluator e = m_comp.GetEval(selIndexes[i]);
        if(e.Daily.Dates[0]>startDate)
          e.Evaluate(); 
        e.Daily.GenerateRollingWindowSeries(m_extraArgs.RollingWindowLength);

        for (int j = 0; j < e.Daily.RollingSharpeSeries[m_extraArgs.RollingSeriesType].Dates.Length; ++j)
        {
          DateTime date = e.Daily.RollingSharpeSeries[m_extraArgs.RollingSeriesType].Dates[j];
          if (date < startDate)
            continue;
          double val = e.Daily.RollingSharpeSeries[m_extraArgs.RollingSeriesType].Data[j];

          if(m_extraArgs.RollingSeriesType==SI.ReturnsEval.RollingSeriesType.Vol)
            val /= 100.0;

          cum.SetValue(date, i, val);
        }
      }
      cum.SortKeys();
      return new SortedDictionary<DateTime, double[]>(cum.GetInnerData());
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:30,代码来源:EvalComparerControl.cs

示例3: reloadTopRight

    private void reloadTopRight(IDictionary<string, DataEncapsValue> list)
    {
      if (list.Count == 0 || m_trArgs.Locked)
        return;

      ConstructGen<double> conTopRight = new ConstructGen<double>(list.Count);
      conTopRight.ColumnHeadings = new string[conTopRight.ArrayLength];
      int i = 0;
      foreach (string s in list.Keys)
      {
        conTopRight.ColumnHeadings[i] = s;
        DatedDataCollectionGen<double> coll = list[s].Data;
        double[] series = (cbTopRightCumulative.Checked) ? coll.Data.Cumulative() : coll.Data;
        for (int j = 0; j < series.Length; ++j)
          conTopRight.SetValue(coll.Dates[j], i, series[j]);

        ++i;
      }
      conTopRight.SortKeys();

      StringBuilder titleBuilder=new StringBuilder();
      foreach (string s in list.Values.Select<DataEncapsValue, string>(x => x.Name).Distinct<string>())
        titleBuilder.Append(s).Append(" / ");
      titleBuilder.Length -= 3;
      lbl_TR_title.Text = titleBuilder.ToString();

      dataCollectionDisplay1.Create(new SortedDictionary<DateTime, double[]>(conTopRight.GetInnerData()), conTopRight.ColumnHeadings);
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:28,代码来源:WtsAnalysisCompareControl.cs

示例4: getCumulativePnls

    private SortedDictionary<DateTime, double[]> getCumulativePnls()
    {
      int[] selIndexes = getSelectedIndixes();

      ConstructGen<double> cum = new ConstructGen<double>(selIndexes.Length);

      DateTime prevDate = DateTime.MinValue;

      DateTime startDate = m_comp.GetDate(m_focus);
      int startI = m_comp.PnlConstruct.Dates.IndexOf(startDate);

      int endI = m_comp.PnlConstruct.Dates.IndexOf(m_comp.AsOfDate);

      for (int i = startI; i <= endI; ++i)
      {
        DateTime date = m_comp.PnlConstruct.Dates[i];

        for (int j = 0; j < selIndexes.Length; ++j)
        {
          if (i == startI)
          {
            cum.SetValue(date, j, m_comp.PnlConstruct.GetValue(date, selIndexes[j]));
          }
          else
          {
            cum.SetValue(date, j, m_comp.PnlConstruct.GetValue(date, selIndexes[j]) + cum.GetValue(prevDate, j));
          }
        }

        prevDate = date;
      }

      return new SortedDictionary<DateTime, double[]>(cum.GetInnerData());
    }
开发者ID:heimanhon,项目名称:researchwork,代码行数:34,代码来源:EvalComparerControl.cs


注:本文中的ConstructGen.GetInnerData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。