mirror of
				https://gitlab.com/klmp200/LO27.git
				synced 2025-11-04 04:03:05 +00:00 
			
		
		
		
	Premiers algorithmes
This commit is contained in:
		
							
								
								
									
										25
									
								
								report.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								report.md
									
									
									
									
									
								
							@@ -36,7 +36,32 @@ Functions *andColSequenceOnMatrix* and *orColSequenceOnMatrix* are implemented w
 | 
				
			|||||||
This is the same thing for *andRowSequenceOnMatrix* and *orRowSequenceOnMatrix* :  
 | 
					This is the same thing for *andRowSequenceOnMatrix* and *orRowSequenceOnMatrix* :  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```C
 | 
					```C
 | 
				
			||||||
 | 
					colSequenceOnMatrix(m:Matrix, operator:(function(bool, bool):bool)): Matrix
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
						a:integer
 | 
				
			||||||
 | 
						b:integer
 | 
				
			||||||
 | 
						i:integer
 | 
				
			||||||
 | 
						j:integer
 | 
				
			||||||
 | 
						newM:Matrix <- createMatrix()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						rowCount(newM) <- rowCount(m)
 | 
				
			||||||
 | 
						if (colCount(m) <= 1) then
 | 
				
			||||||
 | 
							colCount(newM) <- 0
 | 
				
			||||||
 | 
							colSequenceOnMatrix <- newM
 | 
				
			||||||
 | 
						endif
 | 
				
			||||||
 | 
						colCount(newM) <- colCount(m) - 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for i from 0 to colCount(m) - 2, step 1
 | 
				
			||||||
 | 
							for j from 0 to rowCount(m) - 2, step 1
 | 
				
			||||||
 | 
								a <- getCellValue(m, i, j)
 | 
				
			||||||
 | 
								b <- getCellValue(m, i + 1, j)
 | 
				
			||||||
 | 
								if operator(a, b) then
 | 
				
			||||||
 | 
									setCellValue(newM, i, j, true)
 | 
				
			||||||
 | 
								endif
 | 
				
			||||||
 | 
							endfor
 | 
				
			||||||
 | 
						endfor
 | 
				
			||||||
 | 
						colSequenceOnMatrix <- newM;
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Here are the algorithm of the function *applyRules* and all the one related to it :  
 | 
					Here are the algorithm of the function *applyRules* and all the one related to it :  
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user