Coder Social home page Coder Social logo

ben1980 / numericalintegration Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 5.0 2.58 MB

Numerical integration methods as discussed on thoughts-on-cpp.com

Home Page: https://thoughts-on-coding.com

License: MIT License

CMake 3.29% C++ 76.73% Gnuplot 19.98%
cpp numerical-integration numerical numerical-methods

numericalintegration's Introduction

numericalIntegration

A collection of numerical integration methods, as discussed on thoughts-on-coding.com.

Numerical Methods in C++ Part 1: Newton-Cotes Integration

  • Trapezoidal
  • Simpson rule
  • Romberg

Numerical Methods in C++ Part 2: Gauss-Legendre Integration

  • Gauss-Legendre

Getting Started

To get it up and running you just need to execute:

  • ~\numericalIntegration\build\cmake .. -DCMAKE_TOOLCHAIN_FILE={YOUR_PATH_TO_VCPKG}/scripts/buildsystems/vcpkg.cmake
  • ~\numericalIntegration\build\cmake --build .

You can execute the program by ./numericalIntegration

Screen capture of programm execution

Prerequisites

  • fmt external library used for formatting and printing results

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

numericalintegration's People

Contributors

ben1980 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

numericalintegration's Issues

A problem on the zeros of Legendre polynomials

Hello, Ben, your Gauss Legendre integration code is awesome, which benefited me a lot.But there is one question that bothers me. I am looking forward to your answer.

In the file gausslegendre.h, the selection of the initial iteration point of the calculateweightandroot function is very interesting, which is exactly what bothers me. why choose cos(M_PI * (step-0.25)/(mNumberOfIterations+0.5)) as the initial iteration point?

I appreciate all your help and best wishes!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.