Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Collections and Iterators in C++

Collections

  1. Prefer std::deque to std::vector when the size of the collection is unknow.

  2. Suppose set A and B are two set with the same type and set C is another set with the same value type but a different comparison function, then it is still valid to insert …

Useful Plugins for Eclipse

Terminal Plug-in

"Terminal Plug-in" is a fully-working command-line terminal for Eclipse.

EasyShell

"EasyShell" allows to open a shell window or file manager from the popup menu in the navigation tree or editor view.

Vrapper

Vrapper provides Vim-like scheme for Eclispe. You can edit code similar as what you do in …

Parallel Computing Using Multithreading

  1. Not all jobs are suitable for parallel computing. The more comminication that threads has to make, the more dependent the jobs are and the less efficient the parallel computing is.

  2. Generally speaking, commercial softwares (Mathematica, MATLAB and Revolution R, etc.) have very good support on parallel computing.

Python

Please refer …

Install the GSL Library

GSL is an advance C/C++ library that is widely used. To install GSL, you can download the source file and following instruction in the included README and INSTALL document. For Unix/Linux users, the GSL library is often availabe in the repository. For example, you can use the following …

Lvalue Reference and Rvalue Reference

Difference betwen Lvalue and Rvalue Reference

  1. Lvalue and Rvalue are terrible names. They are due to historical reasonal but people stuck with these names.

  2. A lvalue reference has a name while a rvalue reference has no name, in other words, a lvalue reference is persistent while a rvalue reference is …