Interface IStringifier<Element>

    • Field Detail

    • Method Detail

      • stringify

        default String stringify​(Element el)
        Stringify stringifiable object
      • substringifier

        <UnderlyingElement> IStringifier<UnderlyingElement> substringifier​(Ring<UnderlyingElement> ring)
        Get stringifier for the specified ring of some underlying elements, should never give null (use dummy() for absent stringifier)
      • getBinding

        default String getBinding​(Element el)
        Get string binding of corresponding element
      • getBinding

        default String getBinding​(Element el,
                                  String defaultStr)
        Get string binding of corresponding element
        defaultStr - default string
      • dummy

        static <E> IStringifier<E> dummy()
        Dummy stringifier
      • mkStringifier

        static <E> IStringifier<E> mkStringifier​(Map<E,​String> bindings)
        Create simple stringifier
      • mkPolyStringifier

        static <Poly extends IPolynomial<Poly>> IStringifier<Poly> mkPolyStringifier​(Poly factory,
                                                                                     String... variables)
        Create simple stringifier for polynomials with given variables
      • encloseMathParenthesisInSumIfNeeded

        static String encloseMathParenthesisInSumIfNeeded​(String cf)
        Enclose with math parenthesis if needed (e.g. a+b in (a+b)*c should be enclosed)
      • needParenthesisInSum

        static boolean needParenthesisInSum​(String cf)
        If required to enclose with math parenthesis (e.g. a+b in (a+b)*c should be enclosed)
      • hasPlusMinus

        static boolean hasPlusMinus​(int start,
                                    String cf)
      • hasMulDivPlusMinus

        static boolean hasMulDivPlusMinus​(int start,
                                          String cf)
      • defaultVars

        static String[] defaultVars​(int nVars)
        Sequence of strings "a", "b", "c" etc.
        nVars - number of variable
      • defaultVar

        static String defaultVar​(int i,
                                 int nVars)
      • defaultVar

        static String defaultVar()