Factory Patterns in C++

In a nutshell, the factory design pattern enables the practitioner to create objects that share a common theme but without having to specify their exact classes. In essence the factory pattern is used to “Define an interface for creating an object, but let the classes that implement the interface decide which class to instantiate. The …

Continue reading ‘Factory Patterns in C++’ »

STL Set Operations

A summary with code samples of the set operations that come with STL: union, intersection, symmetrical difference and set difference. For consistency, the two sets of integer vectors used in each example are the same and are: Unions The union of two sets is formed by the elements that are present in either one of …

Continue reading ‘STL Set Operations’ »

Genetic Algorithm based routing optimization

Following on from a previous posting on genetic algorithm based routing optimization, further improvements have been made and the source code has been made available. This software is written using MFC / C++ and is essentially a single document interface allowing the user to create network nodes and links by way of standard mouse click …

Continue reading ‘Genetic Algorithm based routing optimization’ »