48 lines
800 B
Markdown
48 lines
800 B
Markdown
---
|
||
aliases:
|
||
up:
|
||
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
|
||
```
|