Blame view

Giac_maj/epsilon-giac/poincare/src/determinant.cpp 835 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  #include <poincare/determinant.h>
  #include <poincare/matrix.h>
  extern "C" {
  #include <assert.h>
  }
  #include <cmath>
  
  namespace Poincare {
  
  Determinant::Determinant() :
    Function("det")
  {
  }
  
  Expression::Type Determinant::type() const {
    return Type::Determinant;
  }
  
  Expression * Determinant::cloneWithDifferentOperands(Expression** newOperands,
          int numberOfOperands, bool cloneOperands) const {
    assert(newOperands != nullptr);
    Determinant * d = new Determinant();
    d->setArgument(newOperands, numberOfOperands, cloneOperands);
    return d;
  }
  
  template<typename T>
  Evaluation<T> * Determinant::templatedEvaluate(Context& context, AngleUnit angleUnit) const {
  
    Evaluation<T> * input = m_args[0]->evaluate<T>(context, angleUnit);
    Evaluation<T> * result = input->createDeterminant();
    delete input;
    return result;
  }
  
  }