https://wiki.liberty-eiffel.org/index.php?title=Lib/storage&feed=atom&action=historyLib/storage - Revision history2024-03-29T11:23:20ZRevision history for this page on the wikiMediaWiki 1.37.0https://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=2510&oldid=prevDkearns: s/LibertyEiffel/Liberty Eiffel/ and typo2016-07-02T10:04:31Z<p>s/LibertyEiffel/Liberty Eiffel/ and typo</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:04, 2 July 2016</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Library]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Library]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of <del style="font-weight: bold; text-decoration: none;">LibertyEiffel</del>. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of <ins style="font-weight: bold; text-decoration: none;">Liberty Eiffel</ins>. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]<del style="font-weight: bold; text-decoration: none;">dimensionnal</del> collections that allow to manipulate object matrices.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]<ins style="font-weight: bold; text-decoration: none;">dimensional</ins> collections that allow to manipulate object matrices.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Dictionaries ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Dictionaries ==</div></td>
</tr>
</table>Dkearnshttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=1883&oldid=prevHzwakenberg at 18:03, 5 September 20142014-09-05T18:03:12Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:03, 5 September 2014</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Smarteiffel]]</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Library]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Library]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of <del style="font-weight: bold; text-decoration: none;">SmartEiffel</del>. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of <ins style="font-weight: bold; text-decoration: none;">LibertyEiffel</ins>. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
</tr>
</table>Hzwakenberghttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=1589&oldid=prevRamack at 21:15, 4 March 20132013-03-04T21:15:17Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 22:15, 4 March 2013</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<del style="font-weight: bold; text-decoration: none;">Book</del>]]</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:<ins style="font-weight: bold; text-decoration: none;">Smarteiffel</ins>]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty"> </td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Library]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).</div></td>
</tr>
</table>Ramackhttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=758&oldid=prevRamack: 8 revisions: initial import from SamrtEiffel Wiki - The Grand SmartEiffel Book2013-03-03T21:04:59Z<p>8 revisions: initial import from SamrtEiffel Wiki - The Grand SmartEiffel Book</p>
<p><b>New page</b></p><div>[[Category:Book]]<br />
<br />
This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] objects (see the [[lib/iterator]] library).<br />
<br />
The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.<br />
<br />
== Collections ==<br />
[[library_class:COLLECTION|Collections]] are classes that allow to store objects and recover them by using integers. The two most known implementations are available: arrays (contiguous storage of elements) and linked lists (storage of elements with references to other elements).<br />
<br />
The most useful classes are:<br />
* [[library_class:ARRAY|<tt>ARRAY</tt>]], the well-known array<br />
* [[library_class:RING_ARRAY|<tt>RING_ARRAY</tt>]], an array whose implementation is optimized for extensions at both ends<br />
* [[library_class:FAST_ARRAY|<tt>FAST_ARRAY</tt>]], an array whose lower bound is always 0<br />
* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists<br />
<br />
There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]dimensionnal collections that allow to manipulate object matrices.<br />
<br />
== Dictionaries ==<br />
[[library_class:DICTIONARY|Dictionaries]] are classes that allow to store key-value couples. Thus a value is available with its key.<br />
<br />
One can say that collections are equivalent to dictionaries whose keys are integers, but the case of collections is kept because it is very frequent.<br />
<br />
There are several dictionary implementations, that use different properties of the keys to accelerate access to the elements without having to look through the whole dictionary.<br />
<br />
* If the keys are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_DICTIONARY|<tt>HASHED_DICTIONARY</tt>]] class that uses the <tt>hash_code</tt> of the keys.<br />
* If the keys are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_DICTIONARY|<tt>AVL_DICTIONARY</tt>]] class that uses a balanced binary tree.<br />
* There is no implementation if the keys have none of these two properties.<br />
<br />
One will notice the [[library_class:BIJECTIVE_DICTIONARY|bijective dictionaries]] whose elements are all unique. One can also define an inverted bijective dictionary ''(planned class for the version 2.3)''.<br />
<br />
== Sets ==<br />
[[library_class:SET|Sets]] are classes that allow to store elements in a unique manner. The goal is not necessarily to retrieve them by a key, but to know how to ''look through'' the set of elements.<br />
<br />
As with dictionaries, there are two kinds of sets in accordance with the properties of the elements.<br />
<br />
* If the elements are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_SET|<tt>HASHED_SET</tt>]] classe that uses the <tt>hash_code</tt> of the elements.<br />
* If the elements are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_SET|<tt>AVL_SET</tt>]] class that uses a balanced binary tree.<br />
* There is no implementation if the elements have none of these two properties.<br />
<br />
== Multi-sets ==<br />
<tt>MULTI_SET</tt>s are not yet implemented.<br />
<br />
== Queues and stacks ==<br />
The [[library_class:QUEUE|<tt>QUEUE</tt>]] class implements queues of objects.<br />
<br />
The [[library_class:STACK|<tt>STACK</tt>]] class implements stacks of objects.<br />
<br />
== Repositories ==<br />
[[library_class:REPOSITORY|Repositories]] allow to store objects so as to retrieve them later. The point here is to ''serialize'' objects. This is useful, for example, to store objects on the hard drive (by using [[lib/io]]), or to transmit them on the network (by using [[lib/net]]), etc.<br />
<br />
These repositories behave like dictionaries whose keys are [[library_class:STRING|strings]] and values are [[library_class:STORABLE|<tt>STORABLE</tt>]]. Their interface is similar to the one of the dictionaries, with additional features to load objects (<tt>update</tt>) and store them (<tt>commit</tt>).<br />
<br />
There is a single implementation of repository: the [[library_class:XML_REPOSITORY|<tt>XML_REPOSITORY</tt>]] class that transforms objects into an XML stream (using [[lib/xml]]).</div>Ramackhttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=755&oldid=prevCadrian: Various typos and rephrasings. Thanks for the translation!2006-02-13T08:00:50Z<p>Various typos and rephrasings. Thanks for the translation!</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:00, 13 February 2006</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{TranslationWanted}}</div></td>
<td colspan="2" class="diff-empty"> </td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Book]]</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Book]]</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply<del style="font-weight: bold; text-decoration: none;"> objects of the</del> [[library_class:ITERATOR|<tt>ITERATOR</tt>]] <del style="font-weight: bold; text-decoration: none;">kind</del> (see the [[lib/iterator]] library).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply [[library_class:ITERATOR|<tt>ITERATOR</tt>]] <ins style="font-weight: bold; text-decoration: none;">objects</ins> (see the [[lib/iterator]] library).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Collections ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Collections ==</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[library_class:COLLECTION|Collections]] are classes that allow to store objects and recover them by using integers. <del style="font-weight: bold; text-decoration: none;">There are the</del> two most known implementations<del style="font-weight: bold; text-decoration: none;">,</del> <del style="font-weight: bold; text-decoration: none;">that</del> <del style="font-weight: bold; text-decoration: none;">are</del> arrays (contiguous storage of elements) and linked lists (storage of elements <del style="font-weight: bold; text-decoration: none;">by</del> references to other elements).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[library_class:COLLECTION|Collections]] are classes that allow to store objects and recover them by using integers. <ins style="font-weight: bold; text-decoration: none;">The</ins> two most known implementations <ins style="font-weight: bold; text-decoration: none;">are</ins> <ins style="font-weight: bold; text-decoration: none;">available:</ins> arrays (contiguous storage of elements) and linked lists (storage of elements <ins style="font-weight: bold; text-decoration: none;">with</ins> references to other elements).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The most useful classes are<del style="font-weight: bold; text-decoration: none;">&nbsp;</del>:</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The most useful classes are:</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:ARRAY|<tt>ARRAY</tt>]], the well-known array</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:ARRAY|<tt>ARRAY</tt>]], the well-known array</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:RING_ARRAY|<tt>RING_ARRAY</tt>]], an array whose implementation is optimized for extensions at both ends</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:RING_ARRAY|<tt>RING_ARRAY</tt>]], an array whose implementation is optimized for extensions at both ends</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:FAST_ARRAY|<tt>FAST_ARRAY</tt>]], an array whose lower bound is 0</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:FAST_ARRAY|<tt>FAST_ARRAY</tt>]], an array whose lower bound is<ins style="font-weight: bold; text-decoration: none;"> always</ins> 0</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]dimensionnal collections that allow to manipulate object matrices</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]dimensionnal collections that allow to manipulate object matrices<ins style="font-weight: bold; text-decoration: none;">.</ins></div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Dictionaries ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Dictionaries ==</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[library_class:DICTIONARY|Dictionaries]] are classes that allow to store key-value couples. Thus<del style="font-weight: bold; text-decoration: none;">,</del> a value is available with its key.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[library_class:DICTIONARY|Dictionaries]] are classes that allow to store key-value couples. Thus a value is available with its key.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>One can say that collections are equivalent to dictionaries whose keys are integers, but the case of collections is kept because it is very frequent.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>One can say that collections are equivalent to dictionaries whose keys are integers, but the case of collections is kept because it is very frequent.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 40:</td>
<td colspan="2" class="diff-lineno">Line 39:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Multi-sets ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Multi-sets ==</div></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><tt>MULTI_SET</tt>s are not implemented.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><tt>MULTI_SET</tt>s are not<ins style="font-weight: bold; text-decoration: none;"> yet</ins> implemented.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Queues and stacks ==</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Queues and stacks ==</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 52:</td>
<td colspan="2" class="diff-lineno">Line 51:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>These repositories behave like dictionaries whose keys are [[library_class:STRING|strings]] and values are [[library_class:STORABLE|<tt>STORABLE</tt>]]. Their interface is similar to the one of the dictionaries, with additional features to load objects (<tt>update</tt>) and store them (<tt>commit</tt>).</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>These repositories behave like dictionaries whose keys are [[library_class:STRING|strings]] and values are [[library_class:STORABLE|<tt>STORABLE</tt>]]. Their interface is similar to the one of the dictionaries, with additional features to load objects (<tt>update</tt>) and store them (<tt>commit</tt>).</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>There is a single implementation of repository<del style="font-weight: bold; text-decoration: none;">&nbsp;</del>: the [[library_class:XML_REPOSITORY|<tt>XML_REPOSITORY</tt>]] class that transforms objects into an XML stream (<del style="font-weight: bold; text-decoration: none;">by </del>using [[lib/xml]]).</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>There is a single implementation of repository: the [[library_class:XML_REPOSITORY|<tt>XML_REPOSITORY</tt>]] class that transforms objects into an XML stream (using [[lib/xml]]).</div></td>
</tr>
</table>Cadrianhttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=754&oldid=prevCadrian: /* Sets */ typo again2006-02-13T07:55:50Z<p><span dir="auto"><span class="autocomment">Sets: </span> typo again</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:55, 13 February 2006</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 35:</td>
<td colspan="2" class="diff-lineno">Line 35:</td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>As with dictionaries, there are two kinds of sets in accordance with the properties of the elements.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>As with dictionaries, there are two kinds of sets in accordance with the properties of the elements.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td>
</tr>
<tr>
<td class="diff-marker">−</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* If the elements are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_SET|<tt>HASHED_SET<tt>]] classe that uses the <tt>hash_code</tt> of the elements.</div></td>
<td class="diff-marker">+</td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* If the elements are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_SET|<tt>HASHED_SET<<ins style="font-weight: bold; text-decoration: none;">/</ins>tt>]] classe that uses the <tt>hash_code</tt> of the elements.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* If the elements are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_SET|<tt>AVL_SET</tt>]] class that uses a balanced binary tree.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* If the elements are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_SET|<tt>AVL_SET</tt>]] class that uses a balanced binary tree.</div></td>
</tr>
<tr>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* There is no implementation if the elements have none of these two properties.</div></td>
<td class="diff-marker"> </td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* There is no implementation if the elements have none of these two properties.</div></td>
</tr>
</table>Cadrianhttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=753&oldid=prevCadrian: /* Sets */ typos2006-02-13T07:55:20Z<p><span dir="auto"><span class="autocomment">Sets: </span> typos</span></p>
<p><b>New page</b></p><div>{{TranslationWanted}}<br />
[[Category:Book]]<br />
<br />
This library is one of the most essential ones of SmartEiffel. It is generally used along with [[lib/abilities]] because some classes require specific properties about objects they can contain. Most of the storage classes are also [[library_class:TRAVERSABLE|<tt>TRAVERSABLE</tt>]], and also supply objects of the [[library_class:ITERATOR|<tt>ITERATOR</tt>]] kind (see the [[lib/iterator]] library).<br />
<br />
The point here is to store objects. This implies not only to "remember" them, but also to "retrieve" them, of course. But everything is based on the ''way'' to retrieve a stored object.<br />
<br />
== Collections ==<br />
[[library_class:COLLECTION|Collections]] are classes that allow to store objects and recover them by using integers. There are the two most known implementations, that are arrays (contiguous storage of elements) and linked lists (storage of elements by references to other elements).<br />
<br />
The most useful classes are&nbsp;:<br />
* [[library_class:ARRAY|<tt>ARRAY</tt>]], the well-known array<br />
* [[library_class:RING_ARRAY|<tt>RING_ARRAY</tt>]], an array whose implementation is optimized for extensions at both ends<br />
* [[library_class:FAST_ARRAY|<tt>FAST_ARRAY</tt>]], an array whose lower bound is 0<br />
* [[library_class:LINKED_LIST|<tt>LINKED_LIST</tt>]] and [[library_class:TWO_WAY_LINKED_LIST|<tt>TWO_WAY_LINKED_LIST</tt>]] are linked lists<br />
<br />
There are also [[library_class:COLLECTION2|two-]] and [[library_class:COLLECTION3|three-]]dimensionnal collections that allow to manipulate object matrices<br />
<br />
== Dictionaries ==<br />
[[library_class:DICTIONARY|Dictionaries]] are classes that allow to store key-value couples. Thus, a value is available with its key.<br />
<br />
One can say that collections are equivalent to dictionaries whose keys are integers, but the case of collections is kept because it is very frequent.<br />
<br />
There are several dictionary implementations, that use different properties of the keys to accelerate access to the elements without having to look through the whole dictionary.<br />
<br />
* If the keys are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_DICTIONARY|<tt>HASHED_DICTIONARY</tt>]] class that uses the <tt>hash_code</tt> of the keys.<br />
* If the keys are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_DICTIONARY|<tt>AVL_DICTIONARY</tt>]] class that uses a balanced binary tree.<br />
* There is no implementation if the keys have none of these two properties.<br />
<br />
One will notice the [[library_class:BIJECTIVE_DICTIONARY|bijective dictionaries]] whose elements are all unique. One can also define an inverted bijective dictionary ''(planned class for the version 2.3)''.<br />
<br />
== Sets ==<br />
[[library_class:SET|Sets]] are classes that allow to store elements in a unique manner. The goal is not necessarily to retrieve them by a key, but to know how to ''look through'' the set of elements.<br />
<br />
As with dictionaries, there are two kinds of sets in accordance with the properties of the elements.<br />
<br />
* If the elements are [[library_class:HASHABLE|<tt>HASHABLE</tt>]], one can use the [[library_class:HASHED_SET|<tt>HASHED_SET<tt>]] classe that uses the <tt>hash_code</tt> of the elements.<br />
* If the elements are [[library_class:COMPARABLE|<tt>COMPARABLE</tt>]], one can use the [[library_class:AVL_SET|<tt>AVL_SET</tt>]] class that uses a balanced binary tree.<br />
* There is no implementation if the elements have none of these two properties.<br />
<br />
== Multi-sets ==<br />
<tt>MULTI_SET</tt>s are not implemented.<br />
<br />
== Queues and stacks ==<br />
The [[library_class:QUEUE|<tt>QUEUE</tt>]] class implements queues of objects.<br />
<br />
The [[library_class:STACK|<tt>STACK</tt>]] class implements stacks of objects.<br />
<br />
== Repositories ==<br />
[[library_class:REPOSITORY|Repositories]] allow to store objects so as to retrieve them later. The point here is to ''serialize'' objects. This is useful, for example, to store objects on the hard drive (by using [[lib/io]]), or to transmit them on the network (by using [[lib/net]]), etc.<br />
<br />
These repositories behave like dictionaries whose keys are [[library_class:STRING|strings]] and values are [[library_class:STORABLE|<tt>STORABLE</tt>]]. Their interface is similar to the one of the dictionaries, with additional features to load objects (<tt>update</tt>) and store them (<tt>commit</tt>).<br />
<br />
There is a single implementation of repository&nbsp;: the [[library_class:XML_REPOSITORY|<tt>XML_REPOSITORY</tt>]] class that transforms objects into an XML stream (by using [[lib/xml]]).</div>Cadrianhttps://wiki.liberty-eiffel.org/index.php?title=Lib/storage&diff=750&oldid=prevCadrian: translation wanted2005-12-22T10:55:47Z<p>translation wanted</p>
<p><b>New page</b></p><div>[[Category:Book]]<br />
{{TranslationWanted}}</div>Cadrian