Skip to content

hereisjohnny2/go-integrals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Integrals

About

Go Integrals is an implementation of numerical integration algorithms in GoLang. It's mainly an library containing mathematical basic 2D-functions and the integrations algorithms it self.

So far the following functions are available:

  • Polynomial (f(x) = c0 + c1*x +c2*x^2 + ... + cn*x^(n-1))
  • Exponential (f(x) = a*e^(b*x))

And the following integration algorithms:

There is also a Line "function" to work with a collection of bi-dimensional points. It's possible to calculate the area under a curve formed by those lines, plot a graphic, read and save data, and calculate its length.

Any other function can be use in the algorithm as long as they implement the Function interface.

To Do

  • Create develop more functions and add math operations between then
  • Plot graphs
  • Save and Load points
  • Integrate over an slice or array of points

Getting Started

Add the package to your project:

go get github.com/hereisjohnny2/go-integrals

The main.go file in the project root is only for testing integration propose. It will be removed in the future.

Tests

On each polynomial function or integration folder run:

cd functions/exponential
go test

About

A numerical integration library in GoLang

Topics

Resources

Stars

Watchers

Forks

Languages