basix_doc 0.1
sum_less_op Struct Reference

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 320 of file syntactic.cpp.


Member Function Documentation

static bool op ( const syntactic s1,
const syntactic s2 
) [inline, static]

Definition at line 322 of file syntactic.cpp.

References mmx::as_generic(), mmx::as_string(), mmx::big_small_compare(), mmx::gen(), mmx::GEN_OVER, mmx::GEN_TIMES, mmx::is_func(), and mmx::is_numeric().

                                                {
    generic g1= as_generic (s1);
    generic g2= as_generic (s2);
    if ((is_func (g1, GEN_TIMES, 2) || is_func (g1, GEN_OVER, 2)) &&
        is<literal> (g1[1]) && is_numeric (as_string (as<literal> (g1[1]))))
      g1= (is_func (g1, GEN_TIMES, 2)? g1[2]: gen (GEN_OVER, 1, g1[2]));
    if ((is_func (g2, GEN_TIMES, 2) || is_func (g2, GEN_OVER, 2)) &&
        is<literal> (g2[1]) && is_numeric (as_string (as<literal> (g2[1]))))
      g2= (is_func (g2, GEN_TIMES, 2)? g2[2]: gen (GEN_OVER, 1, g2[2]));
    return big_small_compare (g1, g2) <= 0;
  }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines