sum_less_op Struct Reference

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 321 of file syntactic.cpp.


Member Function Documentation

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

Definition at line 323 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().

00323                                                 {
00324     generic g1= as_generic (s1);
00325     generic g2= as_generic (s2);
00326     if ((is_func (g1, GEN_TIMES, 2) || is_func (g1, GEN_OVER, 2)) &&
00327         is<literal> (g1[1]) && is_numeric (as_string (as<literal> (g1[1]))))
00328       g1= (is_func (g1, GEN_TIMES, 2)? g1[2]: gen (GEN_OVER, 1, g1[2]));
00329     if ((is_func (g2, GEN_TIMES, 2) || is_func (g2, GEN_OVER, 2)) &&
00330         is<literal> (g2[1]) && is_numeric (as_string (as<literal> (g2[1]))))
00331       g2= (is_func (g2, GEN_TIMES, 2)? g2[2]: gen (GEN_OVER, 1, g2[2]));
00332     return big_small_compare (g1, g2) <= 0;
00333   }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1