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)
def __str__(self): return "%s('%s')" % (parstr(self._f, self), self._side)
def __str__(self): return "%s x %s" % (parstr(self._a, self), parstr(self._b, self))
def __str__(self): return "| %s |" % parstr(self._a, self)
def __str__(self): return "%s^-1" % parstr(self.ufl_operands[0], self)
def __str__(self): return "sum_{%s} %s " % (str( self.ufl_operands[1]), parstr(self.ufl_operands[0], self))
def __str__(self): return "%s ? %s : %s" % tuple( parstr(o, self) for o in self.ufl_operands)
def __str__(self): return "%s x %s" % (parstr(self.ufl_operands[0], self), parstr(self.ufl_operands[1], self))
def __str__(self): a, = self.ufl_operands return "|%s|" % (parstr(a, self), )
def __str__(self): a, b = self.ufl_operands return "%s ** %s" % (parstr(a, self), parstr(b, self))
def __str__(self): a, b = self.ufl_operands return " * ".join((parstr(a, self), parstr(b, self)))
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): 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))
def __str__(self): return "sum_{%s} %s " % (str(self.ufl_operands[1]), parstr(self.ufl_operands[0], self))
def __str__(self): return "%s[%s]" % (parstr(self.ufl_operands[0], self), self.ufl_operands[1])
def __str__(self): a, = self.ufl_operands return "conj(%s)" % (parstr(a, self), )
def __str__(self): a, = self.ufl_operands return "Im[%s]" % (parstr(a, self), )
def __str__(self): return "sum_{%s} %s " % (str(self._index), parstr(self._summand, self))
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())
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))
def __str__(self): return "%s^-1" % parstr(self._A, self)