mirror of
				https://gitlab.com/klmp200/LO27.git
				synced 2025-10-31 03:23:04 +00:00 
			
		
		
		
	1ere correction algos
This commit is contained in:
		
							
								
								
									
										28
									
								
								report.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								report.md
									
									
									
									
									
								
							| @@ -55,7 +55,7 @@ BEGIN | ||||
| 		elem <- nextCol(elem) | ||||
| 	endwhile | ||||
|  | ||||
| 	findMatrixElem <- elem; | ||||
| 	findMatrixElem <- elem | ||||
| END | ||||
| ``` | ||||
|  | ||||
| @@ -78,7 +78,7 @@ createMatrixElem( matrix:Matrix, ColPos:integer, RowPos:integer):bool | ||||
| 	Row:*ListElement <-NULL | ||||
| 	Col:*Listelemnt <- NULL | ||||
|  | ||||
| 	error:integer = 0 | ||||
| 	error:integer <- 0 | ||||
| 	 | ||||
| 	elem: *cellElement <- NULL | ||||
| 	tmp: *cellElement<- NULL | ||||
| @@ -91,7 +91,7 @@ createMatrixElem( matrix:Matrix, ColPos:integer, RowPos:integer):bool | ||||
| 	SetPositionIndex(elem,ColPos,RowPos) | ||||
|  | ||||
| 	Row <- getElementPos(rows(matrix),RowPos) | ||||
| 	if (Row != NULL AND Row->data != NULL) | ||||
| 	if (Row != NULL AND data(Row) != NULL) | ||||
|  | ||||
| 		if (colIndex(data(Row)) == ColPos) | ||||
| 			error ++ | ||||
| @@ -133,7 +133,7 @@ createMatrixElem( matrix:Matrix, ColPos:integer, RowPos:integer):bool | ||||
| 		else  | ||||
| 			tmp <- data(Col) | ||||
| 			while (nextRow(tmp) != NULL AND rowIndex(nextRow(tmp)) < RowPos) do | ||||
| 				tmp = nextRow(tmp) | ||||
| 				tmp <- nextRow(tmp) | ||||
| 			endwhile | ||||
|  | ||||
| 			if (nextRow(tmp) == NULL OR rowIndex(nextRow(tmp)) > RowPos) | ||||
| @@ -146,7 +146,7 @@ createMatrixElem( matrix:Matrix, ColPos:integer, RowPos:integer):bool | ||||
|  | ||||
| 	else  | ||||
| 		push(cols(matrix),elem) | ||||
| 		pos(tail(cols(matrix))) = ColPos; | ||||
| 		pos(tail(cols(matrix))) <- ColPos | ||||
| 	endif | ||||
|  | ||||
|  | ||||
| @@ -177,7 +177,7 @@ BEGIN | ||||
| 		deleteMatrixElem <- -1 | ||||
| 	endif | ||||
|  | ||||
| 	if (Row->data == NULL) | ||||
| 	if (data(Row) == NULL) | ||||
| 		removeElementPos(rows(matrix),RowPos) | ||||
| 		deleteMatrixElem <- -1 | ||||
| 	endif | ||||
| @@ -191,25 +191,25 @@ BEGIN | ||||
| 			tmp <- nextCol(tmp) | ||||
| 		endwhile | ||||
|  | ||||
| 		if (tmp->nextCol != NULL) | ||||
| 		if (nextCol(tmp) != NULL) | ||||
| 			nextCol(tmp) <- nextCol(elem) | ||||
| 		endif | ||||
| 	 | ||||
| 	endif | ||||
|  | ||||
| 	if (data(Row) == NULL){ | ||||
| 	if (data(Row) == NULL) | ||||
| 		removeElementPos(rows(matrix),RowPos) | ||||
| 	} | ||||
| 	endif | ||||
|  | ||||
|  | ||||
| 	Col = getElementPos(cols(matrix),ColPos) | ||||
| 	Col <- getElementPos(cols(matrix),ColPos) | ||||
| 	if (Col == NULL) | ||||
| 		deleteMatrixElem <- -2 | ||||
| 	endif | ||||
|  | ||||
| 	if (Col->data == NULL){ | ||||
| 	if (data(Col) == NULL) | ||||
| 		removeElementPos(cols(matrix),ColPos) | ||||
| 		deleteMatrixElem <- -1; | ||||
| 		deleteMatrixElem <- -1 | ||||
| 	endif | ||||
| 	if (rowIndex(data(Col)) == RowPos) | ||||
| 		data(Col) <- nextRow(elem) | ||||
| @@ -268,7 +268,7 @@ BEGIN | ||||
| 			endif | ||||
| 		endfor | ||||
| 	endfor | ||||
| 	colSequenceOnMatrix <- newM; | ||||
| 	colSequenceOnMatrix <- newM | ||||
| END | ||||
| ``` | ||||
|  | ||||
| @@ -287,7 +287,7 @@ BEGIN | ||||
| 	tempMatrix2:Matrix | ||||
|  | ||||
| 	if (Rules <= 0 OR N < 1) | ||||
| 		applyRules <- matrix; | ||||
| 		applyRules <- matrix | ||||
| 	endif | ||||
|  | ||||
| 	while(power <= 512) do | ||||
|   | ||||
		Reference in New Issue
	
	Block a user