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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
<!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">    +</font></strong> <strong><font color="#0000FF">name</font></strong> := <a href="FAST_ARRAY2.html"><font color="#008000">FAST_ARRAY2</font></a>[<font color="#008000">E</font>];
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">comment</font></strong> :=<font color="#BC8F8F">"Resizable two dimensional array. \
\Unlike ARRAY2, the `lower1' bound and the `lower2' \
\bound are frozen to 0. Thus, one can expect better \
\performances."</font>;
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Inherit</font></strong>
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">parent_collection2</font></strong>:<strong><font color="#A020F0">Expanded</font></strong> <a href="COLLECTION2.html"><font color="#008000">COLLECTION2</font></a>[<font color="#008000">E</font>];
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Public</font></strong>
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">upper1</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">count1</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">upper2</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">count2</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">count</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>;
<br><br><strong><font color="#A020F0">Section</font></strong> <a href="FAST_ARRAY2.html"><font color="#008000">FAST_ARRAY2</font></a>
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">storage</font></strong>:<a href="NATIVE_ARRAY.html"><font color="#008000">NATIVE_ARRAY</font></a>[<font color="#008000">E</font>];
<br><br><strong><font color="#FF0000">    +</font></strong> <strong><font color="#0000FF">capacity</font></strong> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>; <br><em><strong><font color="#707070">        of `storage'.</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">    -</font></strong> <strong><font color="#0000FF">lower1</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :=
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">lower2</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :=
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">create</font></strong> (new_count1,new_count2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) :<font color="#008000">SELF</font><-
<br><em><strong><font color="#707070">        Create with new dimensions.</font></strong></em>
<br><em><strong><font color="#707070">        All elements are set to the default value of type E.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">make</font></strong> (new_count1,new_count2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><em><strong><font color="#707070">        Create or reset self with new dimensions.</font></strong></em>
<br><em><strong><font color="#707070">        All elements are set to the default value of type E.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">from_collection2</font></strong> model:<a href="COLLECTION2.html"><font color="#008000">COLLECTION2</font></a>[<font color="#008000">E</font>] <-
<br><em><strong><font color="#707070">        Uses the `model' to update self.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">from_collection</font></strong> contents:<a href="COLLECTION.html"><font color="#008000">COLLECTION</font></a>[<font color="#008000">E</font>] <strong><font color="#0000FF">size</font></strong> (new_count1, new_count2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><em><strong><font color="#707070">        Reset all bounds using `new_count#i'.</font></strong></em>
<br><em><strong><font color="#707070">        Copy all elements of `contents', line by line into Current.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">from_model</font></strong> model:<a href="COLLECTION.html"><font color="#008000">COLLECTION</font></a>[<a href="COLLECTION.html"><font color="#008000">COLLECTION</font></a>[<font color="#008000">E</font>]] <-
<br><em><strong><font color="#707070">        The `model' is used to fill line by line the COLLECTION2.</font></strong></em>
<br><em><strong><font color="#707070">        Assume all sub-collections of `model' have the number of items.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">sub_collection2</font></strong> (line_min,column_min:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <strong><font color="#0000FF">to</font></strong> (line_max,column_max:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) :<font color="#008000">SELF</font> <-
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Implementation of others feature from COLLECTION2:</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">item</font></strong> (line, column:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) :<font color="#008000">E</font> <-
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">put</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">to</font></strong> (line, column:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">force</font></strong> element:<font color="#008000">E</font> <strong><font color="#0000FF">to</font></strong> (line , column :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">copy</font></strong> other:<font color="#008000">SELF</font> <-
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Writing.</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">set_all_with</font></strong> v:<font color="#008000">E</font> <-
<br><em><strong><font color="#707070">        All element are set with the value v.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</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">    -</font></strong> <strong><font color="#0000FF">slice</font></strong> (l1,up1:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <strong><font color="#0000FF">to</font></strong> (l2,up2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) :<font color="#008000">SELF</font> <-
<br><em><strong><font color="#707070">        Create a new collection initialized with elements of</font></strong></em>
<br><em><strong><font color="#707070">        range `low'..`up'. result has the same dynamic type</font></strong></em>
<br><em><strong><font color="#707070">        as self collection.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">set_slice</font></strong> (l1,up1:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <strong><font color="#0000FF">to</font></strong> (l2,up2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <strong><font color="#0000FF">with</font></strong> element:<font color="#008000">E</font> <-
<br><em><strong><font color="#707070">        Set all the elements in the range [(l1,up1),(l2,up2)] of</font></strong></em>
<br><em><strong><font color="#707070">        self with the element 'element'.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">swap</font></strong> (line1, column1:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <strong><font color="#0000FF">with</font></strong> (line2, column2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Looking and comparison:</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">occurrences</font></strong> elt:<font color="#008000">E</font> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">fast_occurrences</font></strong> elt:<font color="#008000">E</font> :<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Resizing:</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">resize</font></strong> (new_count1,new_count2:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a>) <-
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Looking and Searching:</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">has</font></strong> x:<font color="#008000">E</font> :<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
<br><em><strong><font color="#707070">        Look for `x' using `equal' for comparison.</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">fast_has</font></strong> x:<font color="#008000">E</font> :<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
<br><em><strong><font color="#707070">        Same as `has' but use `=' for comparison</font></strong></em>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Other features:</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><br><strong><font color="#FF0000">    -</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">    -</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">    -</font></strong> <strong><font color="#0000FF">transpose</font></strong> <-
<br><em><strong><font color="#707070">        Transpose the self array</font></strong></em>
<br><br><strong><font color="#FF0000">    -</font></strong> <strong><font color="#0000FF">to_external</font></strong>:<a href="POINTER.html"><font color="#008000">POINTER</font></a> <-
<br><em><strong><font color="#707070">        Gives C access to the internal `storage' (may be dangerous).</font></strong></em>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> Invariant.</B></font>
<br><font FACE="Sans-serif" color="#000000"><B></B></font>
<br><font FACE="Sans-serif" color="#000000"><B> [ ...</B></font>
<br><font FACE="Sans-serif" color="#000000"><B> -? { count1 = upper1 + 1 };</B></font>
<br><font FACE="Sans-serif" color="#000000"><B> -? { count2 = upper2 + 1 };</B></font>
<br><font FACE="Sans-serif" color="#000000"><B> -? { count = count1 * count2};</B></font>
<br><font FACE="Sans-serif" color="#000000"><B> -? { capacity >= count };</B></font>
<br><font FACE="Sans-serif" color="#000000"><B> ];</B></font>
</body>
</html>
|