33 bool Division::needParenthesisWithParent(
const Expression * e)
const {
35 return e->isOfType(types, 3);
38 Expression * Division::shallowReduce(Context& context, AngleUnit angleUnit) {
39 Expression * e = Expression::shallowReduce(context, angleUnit);
46 p->shallowReduce(context, angleUnit);
48 return m->shallowReduce(context, angleUnit);
82 T aa =
c.a(), ab =
c.b(), ba = -aa, bb = ab;
83 T min = d.
a(), max = d.
b();
96 T norm = temp*min + max;
108 template<
typename T> Matrix * Division::computeOnComplexAndMatrix(
const Complex<T> *
c,
const Matrix * n) {
109 Matrix * inverse = n->createInverse<
T>();
110 if (inverse ==
nullptr) {
113 Matrix * result = Multiplication::computeOnComplexAndMatrix<T>(
c, inverse);
118 template<
typename T> Matrix * Division::computeOnMatrices(
const Matrix * m,
const Matrix * n) {
119 if (m->numberOfColumns() != n->numberOfColumns()) {
122 Matrix * inverse = n->createInverse<
T>();
123 if (inverse ==
nullptr) {
126 Matrix * result = Multiplication::computeOnMatrices<T>(m, inverse);
static Complex< T > Cartesian(T a, T b)
Expression * replaceWith(Expression *newOperand, bool deleteAfterReplace=true)
Type type() const override
friend class Multiplication
int polynomialDegree(char symbolName) const override
static Complex< T > compute(const Complex< T > c, const Complex< T > d)
const Expression * m_operands[T]
Expression * clone() const override
ExpressionLayout * createLayout(PrintFloat::Mode floatDisplayMode=PrintFloat::Mode::Default, ComplexFormat complexFormat=ComplexFormat::Default) const
const Expression * operand(int i) const
virtual int polynomialDegree(char symbolName) const
virtual Type type() const =0