LASCNN algorithm: Difference between revisions

Content deleted Content added
No edit summary
Line 10:
<pre>
Function LASCNN(MAHSN)
For ∀ A ∈ MAHSN
For∀𝐴∈𝑀𝐴𝐻𝑆𝑁
If (𝐴→𝐶𝑜𝑛𝑛𝐿𝑖𝑠𝑡A->ConnList.getSize()==1) then
𝐴→SetNonCriticalA->SetNonCritical()=LEAF
Else
Continue = TRUE
While (Continue==TRUE)
Continue = FALSE
For ∀ ActiveConn ∈ ConnList
For∀𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∈𝐶𝑜𝑛𝑛𝐿𝑖𝑠𝑡
If (𝐴∉𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛A∉ActiveConn)then
If (𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠A->ConnNeighbors.getSize()==0)
𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠A->ConnNeighbors.add(𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛ActiveConn)
Continue = TRUE
else
If (𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∩𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠ActiveConn ∩ ConnNeighbors==TRUE)
𝐴𝑐𝑡𝑖V𝑒𝐶𝑜𝑛𝑛∪𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠ActiveConn ∪ ConnNeighbors
Continue = TRUE
Endif
Line 32:
End While
Endif
If (𝐴→𝐶𝑜𝑛𝑛𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠A->ConnNeighbors.getSize()<𝐴→𝑁𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠 A->Neighbors.getSize())
𝐴→SetCriticalA->SetCritical()=TRUE
else
𝐴→SetNonCriticalA->SetNonCritical()=INTERMEDIATE
Endif
End For