MacBook-Pro-de-Oscar.local 2025-5-15:11:31:52
This commit is contained in:
parent
936a7a5a5e
commit
4198d7b94d
42
Graphreg.md
42
Graphreg.md
@ -3,3 +3,45 @@ aliases:
|
|||||||
up:
|
up:
|
||||||
tags:
|
tags:
|
||||||
---
|
---
|
||||||
|
# Routines
|
||||||
|
## ORDREK
|
||||||
|
Code de l'article :
|
||||||
|
```
|
||||||
|
procedure ORDREK(x,y,v)
|
||||||
|
if y>n−k∧deg[x] <k∧n−y<k−deg[x] then
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
if x≤n−k∧deg[x]=k then
|
||||||
|
for i=y+1 to n do
|
||||||
|
if n−x−1 <k−deg[i] then
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
end if
|
||||||
|
while x<n∧deg[x]=k do
|
||||||
|
x∶=x+1
|
||||||
|
end while
|
||||||
|
if v≤y then
|
||||||
|
v∶=y+1
|
||||||
|
end if
|
||||||
|
if x=v then
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
if KATEST()=0 then
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
if x=n∧deg[x]=k then
|
||||||
|
OUTPUT()
|
||||||
|
end if
|
||||||
|
y∶=x
|
||||||
|
while y<n do
|
||||||
|
y∶=y+1
|
||||||
|
if deg[y] <k then
|
||||||
|
INSERT(x,y)
|
||||||
|
ORDREK(x,y,v)
|
||||||
|
DELETE(x,y)
|
||||||
|
end if
|
||||||
|
end while
|
||||||
|
return
|
||||||
|
end procedure
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user