Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
48
Task/Set-consolidation/Refal/set-consolidation.refal
Normal file
48
Task/Set-consolidation/Refal/set-consolidation.refal
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
$ENTRY Go {
|
||||
= <Test (A B) (C D)>
|
||||
<Test (A B) (B D)>
|
||||
<Test (A B) (C D) (D B)>
|
||||
<Test (H I K) (A B) (C D) (D B) (F G H)>;
|
||||
};
|
||||
|
||||
Test {
|
||||
e.S = <Prout e.S ' -> ' <Consolidate e.S>>;
|
||||
};
|
||||
|
||||
Consolidate {
|
||||
e.SS, <Consolidate1 () e.SS>: {
|
||||
e.SS = e.SS;
|
||||
e.SS2 = <Consolidate e.SS2>;
|
||||
};
|
||||
};
|
||||
|
||||
Consolidate1 {
|
||||
(e.CSS) = e.CSS;
|
||||
(e.CSS) (e.S) e.SS,
|
||||
<Consolidate2 (e.CSS) (e.S)>: e.CSS2 =
|
||||
<Consolidate1 (e.CSS2) e.SS>;
|
||||
};
|
||||
|
||||
Consolidate2 {
|
||||
() (e.S) = (e.S);
|
||||
((e.S1) e.SS) (e.S), <Overlap (e.S1) (e.S)>: {
|
||||
True = (<Set e.S1 e.S>) e.SS;
|
||||
False = (e.S1) <Consolidate2 (e.SS) (e.S)>;
|
||||
};
|
||||
};
|
||||
|
||||
Overlap {
|
||||
(e.S1) () = False;
|
||||
(e.S1) (s.I e.S2), e.S1: {
|
||||
e.L s.I e.R = True;
|
||||
e.S1 = <Overlap (e.S1) (e.S2)>;
|
||||
};
|
||||
};
|
||||
|
||||
Set {
|
||||
= ;
|
||||
s.I e.S, e.S: {
|
||||
e.L s.I e.R = <Set e.S>;
|
||||
e.S = s.I <Set e.S>;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue