Content deleted Content added
|
|
<pre>
Function LASCNN (MAHSN)
(1) For∀𝐴∈𝑀𝐴𝐻𝑆𝑁
(2) If (𝐴→𝐶𝑜𝑛𝑛𝐿𝑖𝑠𝑡.getSize()==1)then
(3) 𝐴→SetNonCritical()=LEAF
(4) Else
(5) Continue = TRUE
(6) While (Continue==TRUE)
(7) Continue = FALSE
(8) For∀𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∈𝐶𝑜𝑛𝑛𝐿𝑖𝑠𝑡
(9) If (𝐴∉𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛)then
(10) If (𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠.getSize()==0)
(11) 𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠.add(𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛)
(12) Continue = TRUE
(13) else
(14) If (𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∩𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠==TRUE)
(15) 𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∪𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠
(16) Continue = TRUE
(17) Endif
(18) Endif
(19) Endif
(20) End For
(21) End While
(22) Endif
(23) If (𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠.getSize()<𝐴→𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠.getSize())
(24) 𝐴→SetCritical()=TRUE
(25) else
(26) 𝐴→SetNonCritical()=INTERMEDIATE
(27) Endif
(28) End For
End Function
</pre>
|