Func solvePLAMatrix($inputMatrixPLA, $aInputs) Local $matrixPLA = $inputMatrixPLA Local $outputArray[UBound($matrixPLA) + UBound($matrixPLA, 2) + 2] Local $actualPLAArray For $actualRow = 0 To UBound($aInputs) - 1 Step 1 $actualPLAArray = getPLAValues($matrixPLA[$actualRow][0][0], ($actualRow = 0 ? 1 : $matrixPLA[$actualRow - 1][0][1]), $aInputs[$actualRow]) $matrixPLA[$actualRow][0][1] = $actualPLAArray[0] $matrixPLA[$actualRow][0][2] = $actualPLAArray[1] If ($actualRow = 0) Then For $actualColumn = 1 To UBound($matrixPLA, 2) - 1 Step 1 $actualPLAArray = getPLAValues($matrixPLA[$actualRow][$actualColumn][0], 1, $matrixPLA[$actualRow][$actualColumn - 1][2]) $matrixPLA[$actualRow][$actualColumn][1] = $actualPLAArray[0] $matrixPLA[$actualRow][$actualColumn][2] = $actualPLAArray[1] Next Else For $actualColumn = 1 To UBound($matrixPLA, 2) - 1 Step 1 $actualPLAArray = getPLAValues($matrixPLA[$actualRow][$actualColumn][0], $matrixPLA[$actualRow - 1][$actualColumn][1], $matrixPLA[$actualRow][$actualColumn - 1][2]) $matrixPLA[$actualRow][$actualColumn][1] = $actualPLAArray[0] $matrixPLA[$actualRow][$actualColumn][2] = $actualPLAArray[1] Next EndIf $outputArray[$actualRow] = $matrixPLA[$actualRow][UBound($matrixPLA, 2) - 1][2] Next $outPutArray[UBound($aInputs)] = "---" For $actualRow = UBound($aInputs) To UBound($matrixPLA) - 1 Step 1 $actualPLAArray = getPLAValues($matrixPLA[$actualRow][0][0], $matrixPLA[$actualRow - 1][0][1], 0) $matrixPLA[$actualRow][0][1] = $actualPLAArray[0] $matrixPLA[$actualRow][0][2] = $actualPLAArray[1] For $actualColumn = 1 To UBound($matrixPLA, 2) - 1 Step 1 $actualPLAArray = getPLAValues($matrixPLA[$actualRow][$actualColumn][0], $matrixPLA[$actualRow - 1][$actualColumn][1], $matrixPLA[$actualRow][$actualColumn - 1][2]) $matrixPLA[$actualRow][$actualColumn][1] = $actualPLAArray[0] $matrixPLA[$actualRow][$actualColumn][2] = $actualPLAArray[1] Next $outputArray[$actualRow + 1] = $matrixPLA[$actualRow][UBound($matrixPLA, 2) - 1][2] Next $outputArray[UBound($matrixPLA) + 1] = "---" For $actualColumn = 0 To UBound($matrixPLA, 2) - 1 Step 1 $outputArray[UBound($matrixPLA) + 2 + $actualColumn] = $matrixPLA[UBound($matrixPLA) - 1][$actualColumn][1] Next Return $outputArray EndFunc ;==>solvePLAMatrix ;uvArray[0] = v ;uvArray[1] = u Func getPLAValues($typePLA, $x, $y) Local $uvArray[3] $uvArray[2] = $typePLA & "|" & $x & "|" & $y Local Const $IDENTER = 0 Local Const $ADDER = 1 Local Const $MULTIPLER = 2 Local Const $NEGAT_MULTIPLER = 3 Switch $typePLA Case $IDENTER $uvArray[0] = $x $uvArray[1] = $y Case $ADDER $uvArray[0] = $x $uvArray[1] = ($x Or $y) * 1 Case $MULTIPLER $uvArray[0] = $x * $y $uvArray[1] = $y Case $NEGAT_MULTIPLER $uvArray[0] = ($x And (Not $y)) * 1 $uvArray[1] = $y EndSwitch Return $uvArray EndFunc ;==>getPLAValues