Why O2scl?

A brief discussion of the context of this object-oriented scientific computing library.


I needed to provide a computing framework for my research group. (Necessity is the mother of invention.)

I want my students and colleagues to be able to have a head start.

  • There is little point in having a student to rewrite old code over again when there are so many great new problems that need solving.
  • I wanted something easy to install and use.
  • O2scl takes advantage of homebrew and travis-ci.org to make sure installation and testing works.

Scientific computing has changed significantly in the past few years. (Or maybe a bit more than a few.)

C++0x and C++11 (and their precursors in Boost) have made scientific computing much easier!

  • For example, lambda functions make mathematical methods much easier to implement.
  • Function objects can now be defined and manipulated very succinctly:

    		double a=-0.9, b=0.9;
    		o2scl::root_brent_gsl<> solver;
    		std::function<double(double)> f=[](double x){ return sin(x)-0.1; };
    		solver.solve(a,b,f);
    		cout << a << endl;
    	      
    (adapted from O2scl's ex_lambda.cpp example)

  • Sometimes the best solution is a combination of several different languages and libraries.
  • Python has enabled fast development, but we still want fast execution from C++. GSL is great for many problems, but Fourier transforms are better done in FFTW and linear algebra is better implemented in uBlas, Eigen, or Armadillo.


    Built with Bootstrap.