Finding permutations in strings
In C++ the Standard Template Library provides us with std::next_permutation to easily implement this.
In C++ the Standard Template Library provides us with std::next_permutation to easily implement this.
This is a very similar post to that posted previously, which used a OpenCV and cvBlobsLib to identify contours in video footage and display them on the screen. Please refer to this for detail on how to convert the Red, Green, Blue (RGB) format into Hue, Saturation, Value (HSV) format, and threshold the HSV into …
Continue reading ‘Using OpenCV to find and draw contours in video’ »
A quick guide to setting up and installing OpenCV for using in the Netbeans integrated development environment in Linux. Step 1: Download and extract OpenCV for Linux Versions of OpenCV can be downloaded from here: http://opencv.org/downloads.html Save it to the location of your choice. Open a command prompt, navigate to the download location and unzip:
Breadth First Search From WikiPedia: “Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first, before moving to the next level neighbors” I have …
An excellent implementation of the Simplex algorithm exists over at Google Code, written by Tommaso Urli: https://code.google.com/p/cpplex/ Implemented as class library, it relies on no other dependencies other than the C++ Standard Library. I’ve taken this implementation and compiled it as a Visual Studio application. The only slight modification I needed was to insert: into …
Continue reading ‘Implementation of the Simplex algorithm in Visual C++’ »
Some instructions and screenshots to help you get up and running using the Fast Light Toolkit (FLTK) within the NetBeans development environment in Linux. For configuring FLTK in Visual Studio environments please refer to this post. Go to the FLTK website and download the latest source: http://www.fltk.org
I like using NetBeans for C++ development within Linux environments. Sometimes a gotcha can occur when trying to use the following declaration: You may wish use this in order to utilize smart pointers such as std::unique_ptr, leaving the user with a compilation error such as this: error: ‘unique_ptr’ in namespace ‘std’ does not name a …
Continue reading ‘Fixing compiler problems when using smart pointers in NetBeans’ »
A Hamiltonian path in a graph is a path whereby each node is visited exactly once. A number of graph-related problems require determining if the interconnections between its edges and vertices form a proper Hamiltonian tour, such as traveling salesperson type problems. Such a problem is NP-Complete, that is, the effort required to solve the …
Continue reading ‘Determining if paths are Hamiltonian in C++’ »