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


C# IMatrixData.ClearCategoryRows方法代码示例

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


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

示例1: SetAnnotationRows

 private static void SetAnnotationRows(IMatrixData result, IMatrixData mdata1, IMatrixData mdata2)
 {
     result.CategoryRowNames.Clear();
     result.CategoryRowDescriptions.Clear();
     result.ClearCategoryRows();
     result.NumericRowNames.Clear();
     result.NumericRowDescriptions.Clear();
     result.NumericRows.Clear();
     string[] allCatNames = ArrayUtils.Concat(mdata1.CategoryRowNames, mdata2.CategoryRowNames);
     allCatNames = ArrayUtils.UniqueValues(allCatNames);
     result.CategoryRowNames = new List<string>();
     string[] allCatDescriptions = new string[allCatNames.Length];
     for (int i = 0; i < allCatNames.Length; i++){
         allCatDescriptions[i] = GetDescription(allCatNames[i], mdata1.CategoryRowNames, mdata2.CategoryRowNames,
             mdata1.CategoryRowDescriptions, mdata2.CategoryRowDescriptions);
     }
     result.CategoryRowDescriptions = new List<string>();
     for (int index = 0; index < allCatNames.Length; index++){
         string t = allCatNames[index];
         string[][] categoryRow = new string[mdata1.ExpressionColumnCount + mdata2.ExpressionColumnCount][];
         for (int j = 0; j < categoryRow.Length; j++){
             categoryRow[j] = new string[0];
         }
         int ind1 = mdata1.CategoryRowNames.IndexOf(t);
         if (ind1 >= 0){
             string[][] c1 = mdata1.GetCategoryRowAt(ind1);
             for (int j = 0; j < c1.Length; j++){
                 categoryRow[j] = c1[j];
             }
         }
         int ind2 = mdata2.CategoryRowNames.IndexOf(t);
         if (ind2 >= 0){
             string[][] c2 = mdata2.GetCategoryRowAt(ind2);
             for (int j = 0; j < c2.Length; j++){
                 categoryRow[mdata1.ExpressionColumnCount + j] = c2[j];
             }
         }
         result.AddCategoryRow(allCatNames[index], allCatDescriptions[index], categoryRow);
     }
     string[] allNumNames = ArrayUtils.Concat(mdata1.NumericRowNames, mdata2.NumericRowNames);
     allNumNames = ArrayUtils.UniqueValues(allNumNames);
     result.NumericRowNames = new List<string>(allNumNames);
     string[] allNumDescriptions = new string[allNumNames.Length];
     for (int i = 0; i < allNumNames.Length; i++){
         allNumDescriptions[i] = GetDescription(allNumNames[i], mdata1.NumericRowNames, mdata2.NumericRowNames,
             mdata1.NumericRowDescriptions, mdata2.NumericRowDescriptions);
     }
     result.NumericRowDescriptions = new List<string>(allNumDescriptions);
     foreach (string t in allNumNames){
         double[] numericRow = new double[mdata1.ExpressionColumnCount + mdata2.ExpressionColumnCount];
         for (int j = 0; j < numericRow.Length; j++){
             numericRow[j] = double.NaN;
         }
         int ind1 = mdata1.NumericRowNames.IndexOf(t);
         if (ind1 >= 0){
             double[] c1 = mdata1.NumericRows[ind1];
             for (int j = 0; j < c1.Length; j++){
                 numericRow[j] = c1[j];
             }
         }
         int ind2 = mdata2.NumericRowNames.IndexOf(t);
         if (ind2 >= 0){
             double[] c2 = mdata2.NumericRows[ind2];
             for (int j = 0; j < c2.Length; j++){
                 numericRow[mdata1.ExpressionColumnCount + j] = c2[j];
             }
         }
         result.NumericRows.Add(numericRow);
     }
 }
开发者ID:neuhauser,项目名称:perseus-plugins,代码行数:70,代码来源:MatchingRowsByName.cs


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