Esempio n. 1
0
 def get_expression(self, level, index):
     if level < 3:
        num_terminals = 2
        etemplate = expression.equation_templates2[level]
     else:
        num_terminals = 3
        etemplate = expression.equation_templates3[level-3]
     exp = expression.get_expression(num_terminals, etemplate, index)
     return exp
	def get_expression(self, level, index, family):
		etemplates = expression.equation_templates[family/2]
		if level < 3:
			num_terminals = 2
			etemplate = etemplates[0][level]
		else:
			num_terminals = 3
			etemplate = etemplates[1][level-3]
		exp = expression.get_expression(num_terminals, etemplate, index)
		return exp