public static uint GetDepth(GPChromosome chromosome) { var nodeStack = GetNodeStack(chromosome.ToString()); if ((nodeStack == null) || (nodeStack.Count == 0)) { return(0); } var rootNode = nodeStack.Pop(); GenerateNodeStructure(rootNode, nodeStack); return(GetDepth(rootNode, 0)); }
public static HashSet <IGPChromosome> GenerateAllCombinations(GPChromosome chromosome) { var nodeStack = GetNodeStack(chromosome.ToString()); if ((nodeStack == null) || (nodeStack.Count == 0)) { return(new HashSet <IGPChromosome>()); } var rootNode = nodeStack.Pop(); GenerateNodeStructure(rootNode, nodeStack); return(GenerateAllCombinations(rootNode)); }
public static string ToNormalNotation(GPChromosome chromosome) { return(ToNormalNotation(StringUtil.ToLiteral(chromosome.ToString()))); }