1
0

controller.py 1.1 KB

123456789101112131415161718192021222324
  1. from algebraicfactory.template import AlgebraVisualization, AlgebraPolynomialSplit, AlgebraPolynomialMerge, \
  2. Fractional, Trig, AlgebraMul, General, AlgebraComplex, AlgebraSpecialFunc, Simultaneous, Sloving, Digitization, \
  3. AlgebraSimplify, Rewrite, AlgebraPlot
  4. class AlgebraPolynomial(AlgebraVisualization, AlgebraPolynomialSplit, AlgebraPolynomialMerge,
  5. Fractional, Trig, AlgebraMul, General, AlgebraComplex, AlgebraSpecialFunc, Simultaneous,
  6. Sloving, Digitization, AlgebraSimplify, Rewrite, AlgebraPlot):
  7. def __call__(self): # 返回符号信息
  8. alg_view = []
  9. alg = []
  10. for name in self.algebra_dict:
  11. alg.append(name)
  12. alg_view.append(f"{name} --> {self.algebra_dict[name]}")
  13. value = []
  14. value_view = []
  15. for name in self.symbol_describe:
  16. value.append(name)
  17. value_view.append(f"符号:{name} --> {self.symbol_describe[name]}")
  18. return (value_view, value), (alg_view, alg)
  19. def get_expression_from_name(self, name):
  20. alg = self.get_expression(name)
  21. return self.formula_export(alg)