Research Article
A New Metaheuristic-Based Hierarchical Clustering Algorithm for Software Modularization
Algorithm 1
Pseudocode of encode a labeled tree to Prufer sequence.
| Input: a labeled Tree as T(V, E) | | Output: a Prufer sequence | | Comment: the nodes of T are labeled from 1 to size of V which represents a node with label i. | | PruferSequence ← Empty List | | while V.size is greater than 2 do | | ← the leaf in V with the smallest number | | j ← label of node connected to. | | Remove from V and (, ) from E | | Add j to PruferSequence | | end while | | return PruferSequence |
|