Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roadmap of sorts #113

Open
Dakkers opened this issue Sep 18, 2014 · 13 comments
Open

roadmap of sorts #113

Dakkers opened this issue Sep 18, 2014 · 13 comments
Labels

Comments

@Dakkers
Copy link
Contributor

Dakkers commented Sep 18, 2014

we're currently at v0.5.0, whatever the hell that means, and I'm interested in knowing what the plans are. I'm the one driving the dev, and I'm super 100% okay with that as numerical stuff is my game, but I just wanted opinions from everyone else as to what we should add. here are my thoughts, the version numbers are just some made-up-on-the-fly system:

v0.6.0

release of linalg.js, which is capable of solving linear systems. this should have:

  • Gaussian Elimination (which is part of matrix.js but it can be written more efficiently and pivoting isn't necessary for diagonally dominant systems)
  • special system solvers (triangular, banded, etc.)
  • iterative methods for solving systems.

I've already implemented most of this and am going to submit a PR soon. gotta write tests first and that's going to be a mess.

TODO:

  • least squares solver
  • Hessenberg or Tridiagonalization reduction
  • banded / triangular / special GE
  • QR factorization
  • preconditioning stuff

v0.7.0

release of sparse.js, a combination of linalg.js and matrix.js but for sparse vectors and matrices.
TODO:

  • basically everything implemented except with sparse considerations
  • sparse matrix reordering algorithms, such as Cuthill-McKee, Reverse Cuthill-McKee and that greedy algorithm I can never remember the name of
  • use a binary search to replace .indexOf for these operations (will explain when not so tired)

v0.8.0

release of odes.js, used to solve ODEs. I've already written some solvers but I need to change some things.
TODO:

  • find implementation of Runga-Kutta-Fehlberg (MATLAB's ode45)
  • look into ode23 and the other methods that MATLAB uses
  • rewrite my current solvers (not submitted yet) for arbitrary dimensional systems
  • find out a way to test them, because I've already learned this is a terrible pain.

v0.9.0

release of pdes.js, used to solve PDEs. I don't know much about solving PDEs numerically except for using the finite difference method which is pretty simple to implement I think.
TODO:

  • implementation!
  • look up more methods.

v0.10.0

release of interpolate.js, used for interpolation stuff. already written a bit of this (linear splines) but I need to look into it more (cubic splines are best!)

v1.0.0

this is something I may discuss privately with Steve & Kartik (the latter of whom I've already mentioned it to) but it will probably be its own project, so ideas for 1.0.0 are welcome.

@KartikTalwar @sjkaliski sorry for the essay.
@LarryBattle since you've been helping out recently too.

@Dakkers Dakkers added the idea label Sep 18, 2014
@LarryBattle
Copy link
Contributor

Not bad, but is it really what people want?
I think the best approach is the send out a survey to at least 100 users and discover their thoughts.
The survey should be geared towards answering these questions:

  • Who are you?
  • How do you use numbers.js?
  • What's bad about numbers.js?
  • What's good about numbers.js?
  • What do you want improved in the next release?
  • What should be added in the next release?

The githubers watching this repo should be the easiest to survey.

surveymonkey.com could help.
You could post a link to the survey on the home readme or email people directly.

@Dakkers
Copy link
Contributor Author

Dakkers commented Oct 6, 2014

For the server side, we need something that is for solving linear systems.
Otherwise, people will be using a different language for the server side to
do numerical stuff.

I personally find it hard for us to consider numbers.js a proper numerical
library without some sort of solver. If anything, it should be the next
thing implemented.
On Oct 5, 2014 10:11 PM, "Larry Battle" [email protected] wrote:

Not bad, but is it really what people want?
I think the best approach is the send out a survey to at least 100 users
and discover their thoughts.
The survey should be geared towards answering these questions:

  • Who are you?
  • How do you use numbers.js?
  • What's bad about numbers.js?
  • What's good about numbers.js?
  • What do you want improved in the next release?
  • What should be added in the next release?

The githubers watching this repo should be the easiest to survey.

surveymonkey.com could help.
You could post a link to the survey on the home readme or email people
directly.


Reply to this email directly or view it on GitHub
#113 (comment)
.

@stringparser
Copy link

Hi there. I wasn't invited but I found this really interesting.

For linear systems you already have it with the determinant and Cramer's rule. Even if you have parameters.

And can I suggest one thing? You could modularize numbers.js so if one needs only simple bits of it that'll be possible as well. I'm just talking of dividing the project by its lib/numbers files.

@Dakkers
Copy link
Contributor Author

Dakkers commented Oct 6, 2014

Cramer's rule is a laughing joke to people in numerical Lin alg, and using
the inverse is the most inefficient approach. There exist many better
alternatives which I've already implemented but have yet to write tests
for.
On Oct 6, 2014 2:04 PM, "Javier Carrillo" [email protected] wrote:

Hi there. I wasn't invited but I found this really interesting.

For linear systems you already have it with the determinant and Cramer's
rule. Even if you have parameters.

And can I suggest one thing? You could modularize numbers.js so if one
needs only simple bits of it that'll be possible as well. I'm just talking
of dividing the project by its lib/numbers files.


Reply to this email directly or view it on GitHub
#113 (comment)
.

@Dakkers
Copy link
Contributor Author

Dakkers commented Oct 6, 2014

Also, I was thinking of the standalone / components thing before. I'll look
into it more
On Oct 6, 2014 4:45 PM, "Dakota St. Laurent" [email protected]
wrote:

Cramer's rule is a laughing joke to people in numerical Lin alg, and using
the inverse is the most inefficient approach. There exist many better
alternatives which I've already implemented but have yet to write tests
for.
On Oct 6, 2014 2:04 PM, "Javier Carrillo" [email protected]
wrote:

Hi there. I wasn't invited but I found this really interesting.

For linear systems you already have it with the determinant and Cramer's
rule. Even if you have parameters.

And can I suggest one thing? You could modularize numbers.js so if one
needs only simple bits of it that'll be possible as well. I'm just talking
of dividing the project by its lib/numbers files.


Reply to this email directly or view it on GitHub
#113 (comment)
.

@LarryBattle
Copy link
Contributor

For development I think it would be great if numbers.js followed a gitflow workflow style.
It's a cleaner and more professional way of development.
Gitflow Tutorial: http://nvie.com/posts/a-successful-git-branching-model/

@stringparser
Copy link

Now that I'm think about you are totally right, it is way overkill :D. Gaussian then? Though that is not really good for rounding errors unless fractions can be handled nicely. Maybe diagonalization if is not in already though that would imply to solve a linear equation of arbitrary order too.

@Dakkers
Copy link
Contributor Author

Dakkers commented Oct 9, 2014

@LarryBattle I like it. I'd be alright with that.

@stringparser Gaussian Elimination is a pretty stable algorithm. there are, of course, cases where it doesn't work out, but it's pretty good. I have it implemented and ready to go now, I'm just going to wait on #128 to be checked & merged and then I'll be submitting the basis for linalg.js.

@stringparser
Copy link

@StDako nice! I'm curious of the stability of the Gaussian. I'll investigate.

@devanp92
Copy link
Contributor

Is it possible to add a combinatorics module? I have written one (and tested) and will submit a PR.

@Dakkers
Copy link
Contributor Author

Dakkers commented Feb 4, 2015

I'm wondering if we should basically copy numpy. @LarryBattle thoughts?

@rreusser
Copy link

Hi! Just found this project. I'm a couple days into writing my own math library and decided maybe it made more sense to build on an existing project. I have a reasonably alright background in linear algebra, ODEs and PDEs, and I'd love to make something people can use. You can find my start at spacetime.js. (Pardon the name; it started out physics-oriented.)

To answer your first question: My goal is to do engineering and physics-type calculations in order to make web demos/visualizations. That gets into polynomial root-finding, root-finding for transcendental equations, ODE integration, complex numbers… for a start…

Here are some thoughts:

  • It looks like numbers.js doesn't use typed arrays. Is that something that'd make sense? I've only done vectors so far, but when I get to matrices, I'm planning to unroll everything and use typed arrays and index math. I think that'd make it possible to do views/slices, but… yikes. For complex vectors, I've just interleaved the real and complex components, and manage i/o with getters and setters. Any serious work is encapsulated and unrolled. The goal is to duck-type real vs. complex, which at least slightly alleviates the lack of operator overloading.
  • The linear algebra stuff looks great!

Anyway, I'm curious how or if I might contribute. I currently do have the time! I've done a few things in my library that I think could be pretty useful, specifically:

  • Typed vectors
  • In-place operations (i.e. z1.add(z2)) and operations that create a new objects (e.g. Complex.add(z1,z2)) since JS doesn't support overloading.
  • I added complex trig and hyperbolic trig functions. Is that + tests something you can steal?
  • I feel alright about my RK-2 and RK-4 solvers. The tests cover order of convergence. I also have RKF45 and RK78 with embedded schemes (useful for adaptive stepping!) lying around.
  • I've been going through the Jenkins-Traub polynomial root-finding algorithm. I'm hoping to get that implemented in the next day or two.
  • I also have tridiagonal, periodic tridiagonal and pentadiagonal solvers lying around in some old directory somewhere. Great for PDEs!

I'm not sure where that leaves things. I'd love to make scientific computing a thing that can be done in straight JS, but the thought of extending your excellent linear algebra work to complex numbers makes me slightly nauseated. I'm eager to do something substantial though, and until I go back to work in a month, I definitely have the time! Let me know if there's anything here that makes sense, otherwise I'll keep rolling on my own library and at worst, maybe it'll result in code someone can steal an integrate into a better project!

@sjkaliski
Copy link
Member

@rreusser all contributions are welcomed! In place operations have certainly been something of interest (and a few issues have been filed for it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants