Kruskal’s algorithm is used to find the minimal spanning tree for a network with a set of weighted links. This might be a telecoms network, or the layout for planning pipes and cables, or one of many other applications. (more…)
Tag: C++ / MFC
-
Avoiding Circular Dependencies using Observer Patterns in C++
The basic concept is when you want information stored in one object, called the Model (or subject) to be watched by other objects, called Views (or observers). When information changes in the Model, all views attached to the Model should be notified and their statuses updated accordingly. In simpler terms, class A needs to know about class B, and vice versa, but while avoiding circular dependencies while doing so. (more…)