研究文章

一个新的Metaheuristic-Based软件模块化的层次聚类算法

算法3

伪代码的染色体的评估。
输入:一个染色体ch
输出:更新ch.fitness
ch.fitness = 0
树←解码树的染色体ch
←队列()
tree.root.cf = 1
q.push (tree.root)
不是空的
父母←q.pop ()
孩子1,孩子2←t.children ()
孩子1.cf←exCF(孩子1、家长)
孩子2.cf←exCF(孩子2、家长)
如果child1.cf + child2.cf≥parent.cf然后
q.push(子1)
q.push(子2)
其他的
ch.fitness←ch.fitness + parent.cf
如果
结束时