#ifndef MLPP_NUMERICAL_ANALYSIS_OLD_H #define MLPP_NUMERICAL_ANALYSIS_OLD_H // // NumericalAnalysis.hpp // // #include "core/math/math_defs.h" #include "core/object/reference.h" #include #include class MLPPNumericalAnalysisOld { public: /* A numerical method for derivatives is used. This may be subject to change, as an analytical method for calculating derivatives will most likely be used in the future. */ real_t numDiff(real_t (*function)(real_t), real_t x); real_t numDiff_2(real_t (*function)(real_t), real_t x); real_t numDiff_3(real_t (*function)(real_t), real_t x); real_t constantApproximation(real_t (*function)(real_t), real_t c); real_t linearApproximation(real_t (*function)(real_t), real_t c, real_t x); real_t quadraticApproximation(real_t (*function)(real_t), real_t c, real_t x); real_t cubicApproximation(real_t (*function)(real_t), real_t c, real_t x); real_t numDiff(real_t (*function)(std::vector), std::vector x, int axis); real_t numDiff_2(real_t (*function)(std::vector), std::vector x, int axis1, int axis2); real_t numDiff_3(real_t (*function)(std::vector), std::vector x, int axis1, int axis2, int axis3); real_t newtonRaphsonMethod(real_t (*function)(real_t), real_t x_0, real_t epoch_num); real_t halleyMethod(real_t (*function)(real_t), real_t x_0, real_t epoch_num); real_t invQuadraticInterpolation(real_t (*function)(real_t), std::vector x_0, int epoch_num); real_t eulerianMethod(real_t (*derivative)(real_t), std::vector q_0, real_t p, real_t h); // Euler's method for solving diffrential equations. real_t eulerianMethod(real_t (*derivative)(std::vector), std::vector q_0, real_t p, real_t h); // Euler's method for solving diffrential equations. real_t growthMethod(real_t C, real_t k, real_t t); // General growth-based diffrential equations can be solved by seperation of variables. std::vector jacobian(real_t (*function)(std::vector), std::vector x); // Indeed, for functions with scalar outputs the Jacobians will be vectors. std::vector> hessian(real_t (*function)(std::vector), std::vector x); std::vector>> thirdOrderTensor(real_t (*function)(std::vector), std::vector x); real_t constantApproximation(real_t (*function)(std::vector), std::vector c); real_t linearApproximation(real_t (*function)(std::vector), std::vector c, std::vector x); real_t quadraticApproximation(real_t (*function)(std::vector), std::vector c, std::vector x); real_t cubicApproximation(real_t (*function)(std::vector), std::vector c, std::vector x); real_t laplacian(real_t (*function)(std::vector), std::vector x); // laplacian std::string secondPartialDerivativeTest(real_t (*function)(std::vector), std::vector x); }; #endif /* NumericalAnalysis_hpp */