def __str__(self):
     ops = [parstr(o, self) for o in self._operands]
     if False:
         # Implementation with line splitting:
         limit = 70
         delimop = " * \\\n    * "
         op = " * "
         s = ops[0]
         n = len(s)
         for o in ops[1:]:
             m = len(o)
             if n+m > limit:
                 s += delimop
                 n = m
             else:
                 s += op
                 n += m
             s += o
         return s
     # Implementation with no line splitting:
     return "%s" % " * ".join(ops)
Exemple #2
0
 def __str__(self):
     return "%s('%s')" % (parstr(self._f, self), self._side)
Exemple #3
0
 def __str__(self):
     return "%s x %s" % (parstr(self._a, self), parstr(self._b, self))
 def __str__(self):
     return "| %s |" % parstr(self._a, self)
Exemple #5
0
 def __str__(self):
     return "%s^-1" % parstr(self.ufl_operands[0], self)
Exemple #6
0
 def __str__(self):
     return "sum_{%s} %s " % (str(
         self.ufl_operands[1]), parstr(self.ufl_operands[0], self))
Exemple #7
0
 def __str__(self):
     return "%s ? %s : %s" % tuple(
         parstr(o, self) for o in self.ufl_operands)
Exemple #8
0
 def __str__(self):
     return "%s x %s" % (parstr(self.ufl_operands[0], self),
                         parstr(self.ufl_operands[1], self))
Exemple #9
0
 def __str__(self):
     a, = self.ufl_operands
     return "|%s|" % (parstr(a, self), )
Exemple #10
0
 def __str__(self):
     a, b = self.ufl_operands
     return "%s ** %s" % (parstr(a, self), parstr(b, self))
Exemple #11
0
 def __str__(self):
     a, b = self.ufl_operands
     return " * ".join((parstr(a, self), parstr(b, self)))
Exemple #12
0
 def __str__(self):
     return "%s('%s')" % (parstr(self.ufl_operands[0], self), self._side)
 def __str__(self):
     return "%s[%s]" % (parstr(self._expression, self), self._indices)
 def __str__(self):
     return "%s[%s]" % (parstr(self._expression, self), self._indices)
 def __str__(self):
     if isinstance(self._f, Terminal):
         return "d%s/d[%s]" % (self._f, self._v)
     return "d/d[%s] %s" % (self._v, parstr(self._f, self))
Exemple #16
0
 def __str__(self):
     return "sum_{%s} %s " % (str(self.ufl_operands[1]),
                              parstr(self.ufl_operands[0], self))
Exemple #17
0
 def __str__(self):
     return "%s[%s]" % (parstr(self.ufl_operands[0],
                               self), self.ufl_operands[1])
Exemple #18
0
 def __str__(self):
     a, = self.ufl_operands
     return "conj(%s)" % (parstr(a, self), )
Exemple #19
0
 def __str__(self):
     return "%s^-1" % parstr(self.ufl_operands[0], self)
Exemple #20
0
 def __str__(self):
     a, = self.ufl_operands
     return "Im[%s]" % (parstr(a, self), )
Exemple #21
0
 def __str__(self):
     return "%s('%s')" % (parstr(self.ufl_operands[0], self), self._side)
 def __str__(self):
     return "sum_{%s} %s " % (str(self._index), parstr(self._summand, self))
Exemple #23
0
 def __str__(self):
     return "%s x %s" % (parstr(self.ufl_operands[0], self),
                         parstr(self.ufl_operands[1], self))
 def __str__(self):
     return "%s('%s')" % (parstr(self._f, self), self._side)
 def __str__(self):
     return "%s %s %s" % (parstr(
         self._left, self), self._name, parstr(self._right, self))
 def __str__(self):
     return "%s ? %s : %s" % tuple(parstr(o, self) for o in self.operands())
Exemple #27
0
 def __str__(self):
     if isinstance(self.ufl_operands[0], Terminal):
         return "d%s/d[%s]" % (self.ufl_operands[0], self.ufl_operands[1])
     return "d/d[%s] %s" % (self.ufl_operands[1],
                            parstr(self.ufl_operands[0], self))
 def __str__(self):
     return "%s %s %s" % (parstr(self._left, self), self._name, parstr(self._right, self))
Exemple #29
0
 def __str__(self):
     return "%s^-1" % parstr(self._A, self)
Exemple #30
0
 def __str__(self):
     return "%s[%s]" % (parstr(self.ufl_operands[0], self),
                        self.ufl_operands[1])