GithubHelp home page GithubHelp logo

junaidrahim / program-homework-solver Goto Github PK

View Code? Open in Web Editor NEW
6.0 0.0 1.0 848 KB

Input a few integers of a series and it will return the source code to output that series till the nth term..

License: MIT License

CMake 0.17% C++ 99.83%
cpp lagrange-polynomial-interpolation cmake hack lagrange-interpolation series forthebadge polynomials homework-solver

program-homework-solver's Introduction

HEADER

Codacy Badge

A simple command line application written in C++ that helps you generate source code to produce a given series of integers.

You provide a few terms of the series as input and the program will generate for you, the source code in a few programming languages that prints n number of terms of that particular series.

Motivation

Ever seen questions of the kind "Write a program that prints till the nth term of the series 1,3,5,7..."

Thus thought automating this stuff.

A program in which you enter any series of integers and hopefully it generates the source code you need to output that series in multiple programming languages.

The mathematical method used is Lagranges Interpolation Method.

Lagranges Interpolation Method

Given a set of k + 1 data points

data points

where no two x_j are the same, the interpolation polynomial in the Lagrange form is a linear combination

Lagrange polynomial

of Lagrange basis polynomials Basis Polynomial

Read more at Lagrange Interpolation Method (Wikipedia)

How to Compile and Run

Requirements :

  • Cmake
  • make
  • GCC

You can install these using your preferred package manager in Linux

How to Compile:

  • cd into the project directory
  • run cmake .
  • then run make

The binary program-homework-solver will be compiled in the bin/ directory

Use ./program-homework-solver to run the binary.

Instructions to run the Unit Tests are here

DEMO


LICENSE

Copyright (c) Junaid Rahim. All rights reserved.

Licensed under the MIT License


forthebadge forthebadge forthebadge

program-homework-solver's People

Contributors

codacy-badger avatar coolfool avatar junaidrahim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gauravahya

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.