Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4917


Ignore:
Timestamp:
11/24/10 00:18:44 (14 years ago)
Author:
swinkler
Message:

Worked on retrieval of genetic items (#1278).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.PopulationDiversityAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FineGrainedStructuralPopulationDiversityAnalyzer.cs

    r4886 r4917  
    6666      return result;
    6767    }
    68 
    6968    /*
    7069    #region private class GeneticInformationItem, ported from HL 2
     
    430429      }
    431430
     431      private static IList<GeneticInformationItem> getGeneticInformationItems(SymbolicExpressionTreeNode node) {
     432        // Idea: collect all descendants' lists and then add new items using the retrieved ones.
     433        // This should save lots of time and reduce complexity of the items retrieval process.
     434        List<GeneticInformationItem> list = new List<GeneticInformationItem>();
     435        for (int i = 0; i < node.SubTrees.Count; i++) {
     436          IList<GeneticInformationItem> descendantItems = getGeneticInformationItems(node.SubTrees[i]);
     437          list.AddRange(descendantItems);
     438          foreach (GeneticInformationItem item in descendantItems) {
     439            GeneticInformationItem newItem = new GeneticInformationItem();
     440            newItem.AncestorIndex = i;
     441            newItem.AncestorDefinition = node.Symbol.GetType();
     442            // ... TODO!
     443          }
     444        }
     445        return list;
     446      }
     447
    432448    }
    433449
    434450    #endregion
    435451    */
    436 
    437452  }
    438453}
Note: See TracChangeset for help on using the changeset viewer.