File: LINKED_LIST.html

package info (click to toggle)
lisaac 1%3A0.13.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 15,276 kB
  • ctags: 6,396
  • sloc: ansic: 242,479; xml: 635; lisp: 333; makefile: 116; sh: 73; asm: 38
file content (134 lines) | stat: -rwxr-xr-x 11,944 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE HTML SYSTEM>
<!-- Generated by Lisaac shorter / html style -->
<html>
<head>
<title>
Lisaac prototype interface
</title>
</head>
<body BGCOLOR="#FFFFFF">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Header</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">name</font></strong>    := <a href="LINKED_LIST.html"><font color="#008000">LINKED_LIST</font></a>[<font color="#008000">E</font>];
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">comment</font></strong> :=<font color="#BC8F8F">"One way linked list with internal automatic memorization of the last access."</font>;
  
  <br><font FACE="Sans-serif" color="#000000"><B> One way linked list implementation with internal automatic cached memorization </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> of the last access. Because of the last access memory cache, the traversal of a </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> LINKED_LIST from the `lower' index to the `upper' index using `item' is quite </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> efficient. As one can expect, adding element using `add_first' or</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> `add_last' is really efficient too, actually, the total number of elements </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> (i.e. `count') as well as a reference to the last cell is also cached automatically. </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> Keep in mind that LINKED_LIST uses a one way linked storage from `lower' to `upper', </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> so traversing a LINKED_LIST from `upper' to `lower' will be extremely time consumming </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> (also consider LINKED2_LIST).</B></font>
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Inherit</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">parent_linked_collection</font></strong>:<strong><font color="#A020F0">Expanded</font></strong> <a href="LINKED_COLLECTION.html"><font color="#008000">LINKED_COLLECTION</font></a>[<font color="#008000">E</font>];
    
<br><br><strong><font color="#A020F0">Section</font></strong> <a href="LINKED_LIST.html"><font color="#008000">LINKED_LIST</font></a>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">first_link</font></strong>:<a href="LINKED_LIST_NODE.html"><font color="#008000">LINKED_LIST_NODE</font></a>[<font color="#008000">E</font>];
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  NULL when empty or gives access to the first element.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">last_link</font></strong>:<a href="LINKED_LIST_NODE.html"><font color="#008000">LINKED_LIST_NODE</font></a>[<font color="#008000">E</font>];
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  NULL when empty or gives access to the last element.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">mem_idx</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>; 
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">mem_lnk</font></strong>:<a href="LINKED_LIST_NODE.html"><font color="#008000">LINKED_LIST_NODE</font></a>[<font color="#008000">E</font>];
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  To speed up accessing, `mem_idx' and `mem_lnk' is the</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  memory of the last access done. For example, after</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  item(1), `mem_idx' is 1 and `mem_lnk' is `first_link'.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  When list is empty, `first_link' is NULL as well as</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  `mem_lnk' and `mem_idx' is 0;</font></strong></em>
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Public</font></strong>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">create</font></strong>:<font color="#008000">SELF</font> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Make an empty list;</font></strong></em>
      
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">is_empty</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <- 
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">add_first</font></strong> element:<font color="#008000">E</font> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">add_last</font></strong> element:<font color="#008000">E</font> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">add</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">to</font></strong> index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">remove_first</font></strong> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">remove</font></strong> index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">first</font></strong>:<font color="#008000">E</font> <- 
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">last</font></strong>:<font color="#008000">E</font> <- 
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">item</font></strong> i:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<font color="#008000">E</font> <-
      
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">put</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">to</font></strong> i:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">count</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <- 
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">set_all_with</font></strong> v:<font color="#008000">E</font> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">copy</font></strong> other:<font color="#008000">SELF</font> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> '<font color="#B8860B">==</font>'  <strong><font color="#A020F0">Right</font></strong> <font color="#A020F0">60</font> other:<font color="#008000">SELF</font> :<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">is_equal_map</font></strong> other:<font color="#008000">SELF</font> :<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">index_of</font></strong> x:<font color="#008000">E</font> <strong><font color="#0000FF">start</font></strong> start_index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">reverse_index_of</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">start</font></strong> start_index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
       
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">fast_index_of</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">start</font></strong> start_index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">fast_reverse_index_of</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">start</font></strong> start_index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
      
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">clear</font></strong> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">from_collection</font></strong> model:<a href="COLLECTION.html"><font color="#008000">COLLECTION</font></a>[<font color="#008000">E</font>] <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">slice</font></strong> low:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <strong><font color="#0000FF">to</font></strong> up:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<font color="#008000">SELF</font> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">occurrences</font></strong> element:<font color="#008000">E</font> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">fast_occurrences</font></strong> element:<font color="#008000">E</font> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">force</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">to</font></strong> index:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">all_default</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">remove_last</font></strong> <-
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">replace_all</font></strong> old_value:<font color="#008000">E</font> <strong><font color="#0000FF">with</font></strong> new_value:<font color="#008000">E</font> <-
      
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">fast_replace_all</font></strong> old_value:<font color="#008000">E</font> <strong><font color="#0000FF">with</font></strong> new_value:<font color="#008000">E</font> <-
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">reverse</font></strong> <-
      
</body>
</html>