Giter Site home page Giter Site logo

rugheid / swift-matheagle Goto Github PK

View Code? Open in Web Editor NEW
42.0 3.0 6.0 3.79 MB

A general math framework to make using math easy. Currently supports function solving and optimisation, matrix and vector algebra, complex numbers, big int, big frac, big rational, graphs and general handy extensions and functions.

License: MIT License

Swift 72.43% Python 0.10% C 9.86% Objective-C 4.19% C++ 13.42%
swift complex-numbers mathematics biginteger graph-algorithms prime-numbers vector-math matrix-math

swift-matheagle's People

Contributors

anthonyclays avatar kellyroach avatar mennovf avatar rugheid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

swift-matheagle's Issues

Combinatorics routines

  • Permutations / combinations iterators
  • gamma function
  • integer / fixed set partitions
  • calculating the parity of a permutation

Swift 3 compatibility

Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.

Thanks ๐Ÿ˜„

GNU MPFR

Change the BigFloat class to use GNU MPFR instead of GMP. This allows the use of more important functions like logarithms.

Add more benchmarks

Current benchmarks are not entirely representative of the performance, as simple vectorized computations are easily compiled to near-perfect machine code.

Some benchmark suggestions:

  • Linear algebra routines (SVD, matrix inverse, eigenvalues...)
  • Number theory functions (primality tests, integer factorization...)
  • Optimization (test using rosenbrock function, count the number of objective function calls)

Add more optimization routines

The only optimization procedure currently implemented is the golden section method. Optimization of functions with more than one variable (most notable Rosenbrock's function) is impossible without other methods.

Some initial suggestions:

For a well-written, high-level, fast and clear example of those (and other) routines, I highly recommend checking out Optim.jl.

GNU Scientific Library

The GNU Scientific Library contains many nice features, including polynomials, permutations, combinations, FFT, ...

Make Complex generic

As the readme states:

The biggest advantage about MathEagle is that it's totally generic. ๐Ÿ˜‰

Making Complex generic over any real number would be great (especially when you get around to adding arbitrary precision numerics)

Make numberOfDigits function

This function could use something like this, but then Swifty:

n = 1;
if (i >= 100000000){i /= 100000000; n += 8;}
if (i >= 10000){i /= 10000; n += 4;}
if (i >= 100){i /= 100; n += 2;}
if (i >= 10){i /= 10; n += 1;}

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.