diff --git a/main.cc b/main.cc index e052b1a..d03e34b 100644 --- a/main.cc +++ b/main.cc @@ -1,26 +1,29 @@ -/** - * @file - * - * @author Lucas Frérot - * - * @section LICENSE - * - * Copyright (©) 2018 EPFL (Ecole Polytechnique Fédérale de - * Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des - * Solides) - * - * Expolit is free software: you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 3 of the License, or (at your option) any - * later version. - * - * Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Tamaas. If not, see . - * - */ +#include "differentiation.hh" +#include "exponential.hh" +#include "integration.hh" +#include "polynomial.hh" +#include +#include +using namespace expolit; + +int main() { + Polynomial, 2> p({1, 0, 1}); + std::cout << p(std::complex(0, 1)) << "\n" + << p << "\n" + << differentiate(p) << "\n" + << integrate(p) << "\n"; + + Exponential e(p); + std::cout << differentiate(e) << "\n"; + + Polynomial p2({0, 2}); + Exponential e2(p2); + std::cout << integrate(e2) << "\n" << differentiate(integrate(e2)) << "\n"; + + std::cout << p * (p2) << "\n"; + std::cout << p * (p2 * e2) << "\n"; + std::cout << (p * p2) * e2 << "\n"; + std::cout << integrate(e2 * p2) << "\n"; + return 0; +}