<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Class DS_BILINEAR</title>
</head>

<body bgcolor="#FFFFFF">

<table border="0" width="100%">
    <tr>
        <td><font size="6"><strong>Class DS_BILINEAR</strong></font></td>
        <td align="right"><a href="ds_arrayed_stack.html"><img
        src="../../image/previous.gif" alt="Previous" border="0"
        width="40" height="40"></a><a
        href="ds_bilinear_cursor.html"><img
        src="../../image/next.gif" alt="Next" border="0"
        width="40" height="40"></a></td>
    </tr>
</table>

<hr size="1">

<pre><font color="#000080"><em><strong>note</strong></em></font></pre>

<blockquote>
    <pre><em>description</em>:

<font color="#800000"><em>    &quot;Data structures that can be traversed forward and backward&quot;

</em></font><em>library:    </em><font color="#800000"><em>&quot;Gobo Eiffel Structure Library&quot;
</em></font><em>author:     </em><font color="#800000"><em>&quot;Eric Bezault &lt;</em></font><a
href="mailto:ericb@gobosoft.com"><font color="#800000"><em>ericb@gobosoft.com</em></font></a><font
color="#800000"><em>&gt;&quot;
</em></font><em>copyright:  </em><font color="#800000"><em>&quot;Copyright (c) 1999-2001, Eric Bezault and others&quot;
</em></font><em>license:   </em><font color="#800000"><em> &quot;MIT License&quot;</em></font></pre>
</blockquote>

<pre><font color="#000080"><em><strong>deferred class interface</strong></em></font></pre>

<blockquote>
    <pre><em>DS_BILINEAR </em>[<em>G</em>]</pre>
</blockquote>

<pre><font color="#000080"><em><strong>inherit</strong></em></font></pre>

<blockquote>
    <pre><a href="ds_linear.html"><em>DS_LINEAR</em></a><em> </em>[<em>G</em>]
    <a href="ds_traversable.html"><em>DS_TRAVERSABLE</em></a><em> </em>[<em>G</em>]<em>
        </em><a href="ds_container.html"><em>DS_CONTAINER</em></a><em> </em>[<em>G</em>]
<em>    </em><a href="ds_searchable.html"><em>DS_SEARCHABLE</em></a><em> </em>[<em>G</em>]<em>
        </em><a href="ds_container.html"><em>DS_CONTAINER</em></a><em> </em>[<em>G</em>]</pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><em> </em>{<em>NONE</em>}<font
color="#008000"> -- Initialization</font></pre>

<blockquote>
    <pre><a name="make_default"><em>make_default</em></a><em>
</em><font color="#008000">        -- Create an empty container.</font><em>
</em><font color="#008000">        -- (From </font><a
href="ds_container.html#make_default"><font color="#008000"><em>DS_CONTAINER</em></font></a><font
color="#008000">.)</font><em>
</em><font color="#000080"><em><strong>    deferred</strong></em></font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        empty</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature </strong></em></font><font
color="#008000">-- Access</font></pre>

<blockquote>
    <pre><a name="item_for_iteration"><em>item_for_iteration</em></a>:<em> G
        </em><font color="#008000">-- Item at internal cursor position</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_traversable.html#item_for_iteration"><font
color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_off</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#off"><em>off</em></a></pre>
    <pre><a name="first"><em>first</em></a>:<em> G
        </em><font color="#008000">-- First item in container</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#first"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_empty</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em>
    </em><font color="#000080"><em><strong>deferred
    ensure</strong></em></font><em>
        has_first</em>: <a href="#has"><em>has</em></a><em> </em>(<font
color="#008080"><em>Result</em></font>)</pre>
    <pre><a name="last"><em>last</em></a><em>: G
        </em><font color="#008000">-- Last item in container</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_empty</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em>
    </em><font color="#000080"><em><strong>deferred
    ensure</strong></em></font><em>
        has_last</em>: <a href="#has"><em>has</em></a><em> </em>(<font
color="#008080"><em>Result</em></font>)</pre>
    <pre><a name="new_cursor"><em>new_cursor</em></a><em>: </em><a
href="ds_bilinear_cursor.html"><em>DS_BILINEAR_CURSOR</em></a><em> </em>[<em>G</em>]<em>
        </em><font color="#008000">-- New external cursor for traversal</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_traversable.html#new_cursor"><font color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>deferred
    ensure</strong></em></font><em>
        cursor_not_void</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em>/=<em> </em><font
color="#008080"><em>Void</em></font><em>
        valid_cursor</em>:<em> </em><a href="#valid_cursor"><em>valid_cursor</em></a><em> </em>(<font
color="#008080"><em>Result</em></font>)</pre>
    <pre><a name="equality_tester"><em>equality_tester</em></a>:<em> </em><a
href="ds_equality_tester.html"><em>DS_EQUALITY_TESTER</em></a><em> </em>[<em>G</em>]<em>
        </em><font color="#008000">-- Equality tester;
        -- A void equality tester means that `='
        -- will be used as comparison criterion.
        -- (From </font><a
href="ds_searchable.html#equality_tester"><font color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Measurement</font></pre>

<blockquote>
    <pre><a name="count"><em>count</em></a>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/integer.html"><em>INTEGER</em></a><font
color="#000080"><em><strong>
        </strong></em></font><font color="#008000">-- Number of items in container
        -- (From </font><a href="ds_container.html#count"><font
color="#008000"><em>DS_CONTAINER</em></font></a><font
color="#008000">.)</font><font color="#000080"><em><strong>
    deferred</strong></em></font></pre>
    <pre><a name="occurrences"><em>occurrences</em></a><em> </em>(<em>v</em>:<em> G</em>):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/integer.html"><em>INTEGER</em></a><em>
        </em><font color="#008000">-- Number of times </font><em>v</em><font
color="#008000"> appears in container
        -- (Use </font><a href="#equality_tester"><em>equality_tester</em></a><font
color="#008000">'s comparison criterion
        -- if not void, use `=' criterion otherwise.)
        -- (From </font><a href="ds_searchable.html#occurrences"><font
color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        positive</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em>&gt;=<em> </em><font
color="#808000"><em>0</em></font><em>
        has</em>:<em> </em><a href="#has"><em>has</em></a><em> </em>(<em>v</em>)<em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#008080"><em>Result</em></font><em> </em>&gt;=<em> </em><font
color="#808000"><em>1</em></font></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Status report</font></pre>

<blockquote>
    <pre><a name="has"><em>has</em></a><em> </em>(<em>v</em>:<em> G</em>):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Does container include </font><em>v</em><font
color="#008000">?
        -- (Use </font><a href="#equality_tester"><em>equality_tester</em></a><font
color="#008000">'s comparison criterion
        -- if not void, use `=' criterion otherwise.)</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_searchable.html#has"><font color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        not_empty</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a></pre>
    <pre><a name="is_empty"><em>is_empty</em></a>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><font
color="#000080"><em><strong>
       </strong></em></font><font color="#008000"> -- Is container empty?
        -- (From </font><a href="ds_container.html#is_empty"><font
color="#008000"><em>DS_CONTAINER</em></font></a><font
color="#008000">.)</font></pre>
    <pre><a name="is_first"><em>is_first</em></a>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is internal cursor on first item?</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#is_first"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        not_empty</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em>
        not_off</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em>
        definition</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em>(<a
href="#item_for_iteration"><em>item_for_iteration</em></a><em> </em>= <a
href="#first"><em>first</em></a>)</pre>
    <pre><a name="is_last"><em>is_last</em></a><em>: </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is internal cursor on last item?</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        not_empty</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em>
        not_off</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em>
        definition</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em>(<a
href="#item_for_iteration"><em>item_for_iteration</em></a><em> </em>= <a
href="#last"><em>last</em></a>)</pre>
    <pre><a name="after"><em>after</em></a><em>: </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is there no valid position to right of internal cursor?
        -- (From </font><a href="ds_linear.html#after"><font
color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font></pre>
    <pre><a name="before"><em>before</em></a><em>: </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is there no valid position to left of internal cursor?</font></pre>
    <pre><a name="off"><em>off</em></a><em>: </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is there no item at internal cursor position?
        -- (From </font><a href="ds_traversable.html#off"><font
color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font></pre>
    <pre><a name="same_position"><em>same_position</em></a><em> </em>(<em>a_cursor</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><a
href="#new_cursor"><em>new_cursor</em></a>):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is internal cursor at same position as </font><em>a_cursor</em><font
color="#008000">?</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_traversable.html#same_position"><font color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        a_cursor_not_void</em>:<em> a_cursor </em>/= <font
color="#008080"><em>Void</em></font></pre>
    <pre><a name="valid_cursor"><em>valid_cursor</em></a><em> </em>(<em>a_cursor</em>:<em> </em><a
href="ds_cursor.html"><em>DS_CURSOR</em></a><em> </em>[<em>G</em>]):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is </font><em>a_cursor</em><font
color="#008000"> a valid cursor?
        -- (From </font><a
href="ds_traversable.html#valid_cursor"><font color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        a_cursor_not_void</em>:<em> a_cursor </em>/=<em> </em><font
color="#008080"><em>Void</em></font></pre>
    <pre><a name="same_items"><em>same_items</em></a><em> </em>(<em>v</em>,<em> u</em>:<em> G</em>):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
       </em><font color="#008000"> -- Are </font><em>v</em><font
color="#008000"> and </font><em>u</em><font color="#008000"> considered equal?
        -- (Use </font><a href="#equality_tester"><em>equality_tester</em></a><font
color="#008000">'s comparison criterion
        -- if not void, use `=' criterion otherwise.)
</font><em>        </em><font color="#008000">-- (From </font><a
href="ds_searchable.html#same_items"><font color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font></pre>
    <pre><a name="same_equality_tester"><em>same_equality_tester</em></a><em> </em>(<em>other</em>:<em> </em><a
href="ds_searchable.html"><em>DS_SEARCHABLE</em></a><em> </em>[<em>G</em>]):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
       </em><font color="#008000"> -- Does container use the same comparison
        -- criterion as </font><em>other</em><font
color="#008000">?</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_searchable.html#same_equality_tester"><font
color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        other_not_void</em>:<em> other </em>/=<em> </em><font
color="#008080"><em>Void</em></font></pre>
    <pre><a name="equality_tester_settable"><em>equality_tester_settable</em></a><em> </em>(<em>a_tester</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><a
href="#equality_tester"><em>equality_tester</em></a>):<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
</em><font color="#008000">        -- Can </font><a
href="#set_equality_tester"><em>set_equality_tester</em></a><font
color="#008000"> be called with </font><em>a_tester</em><font
color="#008000">
        -- as argument in current state of container?
        -- (Default answer: True.)
</font><em>        </em><font color="#008000">-- (From </font><a
href="ds_searchable.html#equality_tester_settable"><font
color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Comparison</font></pre>

<blockquote>
    <pre><a name="is_equal"><em>is_equal</em></a><em> </em>(<em>other</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><font
color="#008080"><em>Current</em></font><em>)</em>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/boolean.html"><em>BOOLEAN</em></a><em>
        </em><font color="#008000">-- Is current container equal to </font><em>other</em><font
color="#008000">?</font><em>
        </em><font color="#008000">-- (From </font><a
href="http://www.gobosoft.com/eiffel/nice/elks95/general.html#is_equal"><font
color="#008000"><em>GENERAL</em></font></a><font color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        other_not_void</em>:<em> other </em>/=<em> </em><font
color="#008080"><em>Void</em></font><em>
    </em><font color="#000080"><em><strong>deferred</strong></em></font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        consistent</em>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/general.html#standard_is_equal"><em>standard_is_equal</em></a><em> </em>(<em>other</em>)<em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><font
color="#008080"><em>Result</em></font><em>
        same_type</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/general.html#same_type"><em>same_type</em></a><em> </em>(<em>other</em>)<em>
        symmetric</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> other</em>.<a
href="#is_equal"><em>is_equal</em></a><em> </em>(<font
color="#008080"><em>Current</em></font>)<em>
        same_count</em>:<em> </em><font color="#008080"><em>Result</em></font><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> count </em>=<em> other</em>.<a
href="#count"><em>count</em></a></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font> <font
color="#008000">-- Duplication</font></pre>

<blockquote>
    <pre><a name="copy"><em>copy</em></a><em> </em>(<em>other</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><font
color="#008080"><em>Current</em></font>)<em>
        </em><font color="#008000">-- Copy </font><em>other</em><font
color="#008000"> to current container.
        -- (From </font><a
href="http://www.gobosoft.com/eiffel/nice/elks95/general.html#copy"><font
color="#008000"><em>GENERAL</em></font></a><font color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        other_not_void</em>:<em> other </em>/= <font
color="#008080"><em>Void</em></font><em>
        type_identity</em>:<em> </em><a
href="http://www.gobosoft.com/eiffel/nice/elks95/general.html#same_type"><em>same_type</em></a><em> </em>(<em>other</em>)<em>
    </em><font color="#000080"><em><strong>deferred
    ensure</strong></em></font><em>
        is_equal</em>:<em> </em><a href="#is_equal"><em>is_equal</em></a><em> </em>(<em>other</em>)</pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Setting</font></pre>

<blockquote>
    <pre><a name="set_equality_tester"><em>set_equality_tester</em></a><em> </em>(<em>a_tester</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><a
href="#equality_tester"><em>equality_tester</em></a>)<em>
        </em><font color="#008000">-- Set </font><a
href="#equality_tester"><em>equality_tester</em></a><font
color="#008000"> to </font><em>a_tester</em><font color="#008000">.
        -- A void equality tester means that `='
        -- will be used as comparison criterion.</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_searchable.html#set_equality_tester"><font
color="#008000"><em>DS_SEARCHABLE</em></font></a><font
color="#008000">.)</font><em>
</em><font color="#000080"><em><strong>    require</strong></em></font><em>
        equality_tester_settable</em>:<em> </em><a
href="#equality_tester_settable"><em>equality_tester_settable</em></a><em> </em>(<em>a_tester</em>)<em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        equality_tester_set</em>:<em> </em><a
href="#equality_tester"><em>equality_tester</em></a><em> </em>= <em>a_tester</em></pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Cursor movement</font></pre>

<blockquote>
    <pre><a name="start"><em>start</em></a><em>
        </em><font color="#008000">-- Move internal cursor to first position.</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#start"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        empty_behavior</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#after"><em>after</em></a><em>
        not_empty_behavior</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#is_first"><em>is_first</em></a></pre>
    <pre><a name="finish"><em>finish</em></a><em>
        </em><font color="#008000">-- Move internal cursor to last position.</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        empty_behavior</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#before"><em>before</em></a><em>
        not_empty_behavior</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#is_empty"><em>is_empty</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#is_last"><em>is_last</em></a></pre>
    <pre><a name="forth"><em>forth</em></a><em>
        </em><font color="#008000">-- Move internal cursor to next position.</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#forth"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_after</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#after"><em>after</em></a></pre>
    <pre><a name="back"><em>back</em></a><em>
        </em><font color="#008000">-- Move internal cursor to previous position.</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_before</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#before"><em>before</em></a></pre>
    <pre><a name="search_forth"><em>search_forth</em></a><em> </em>(<em>v</em>:<em> G</em>)<em>
        </em><font color="#008000">-- Move internal cursor to first position at or after current
        -- position where </font><a href="#item_for_iteration"><em>item_for_iteration</em></a><font
color="#008000"> and </font><em>v</em><font color="#008000"> are equal.
        -- (Use </font><a href="#equality_tester"><em>equality_tester</em></a><font
color="#008000">'s comparison criterion
        -- if not void, use `=' criterion otherwise.)
        -- Move </font><a href="#after"><em>after</em></a><font
color="#008000"> if not found.</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#search_forth"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_off</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em> </em><font color="#000080"><em><strong>or</strong></em></font><em> </em><a
href="#after"><em>after</em></a></pre>
    <pre><a name="search_back"><em>search_back</em></a><em> </em>(<em>v</em>:<em> G</em>)<em>
        </em><font color="#008000">-- Move internal cursor to first position at or before current
        -- position where </font><a href="#item_for_iteration"><em>item_for_iteration</em></a><font
color="#008000"> and </font><em>v</em><font color="#008000"> are equal.
        -- (Use </font><a href="#equality_tester"><em>equality_tester</em></a><font
color="#008000">'s comparison criterion
        -- if not void, use `=' criterion otherwise.)
        -- Move </font><a href="#before"><em>before</em></a><font
color="#008000"> if not found.</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        not_off</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em> </em><font color="#000080"><em><strong>or</strong></em></font><em> </em><a
href="#before"><em>before</em></a></pre>
    <pre><a name="go_after"><em>go_after</em></a><em>
        </em><font color="#008000">-- Move cursor to </font><a
href="#after"><em>after</em></a><font color="#008000"> position.</font><em>
        </em><font color="#008000">-- (From </font><a
href="ds_linear.html#go_after"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        after</em>:<em> </em><a href="#after"><em>after</em></a></pre>
    <pre><a name="go_before"><em>go_before</em></a><em>
        </em><font color="#008000">-- Move cursor to </font><a
href="#before"><em>before</em></a><font color="#008000"> position.</font><em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        before: </em><a href="#before"><em>before</em></a></pre>
    <pre><a name="go_to"><em>go_to</em></a><em> </em>(<em>a_cursor</em>:<em> </em><font
color="#000080"><em><strong>like</strong></em></font><em> </em><a
href="#new_cursor"><em>new_cursor</em></a>)<em>
        </em><font color="#008000">-- Move internal cursor to </font><em>a_cursor</em><font
color="#008000">'s position.
        -- (From </font><a href="ds_traversable.html#go_to"><font
color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>require</strong></em></font><em>
        cursor_not_void</em>:<em> a_cursor </em>/=<em> </em><font
color="#008080"><em>Void</em></font><em>
        valid_cursor</em>:<em> </em><a href="#valid_cursor"><em>valid_cursor</em></a><em> </em>(<em>a_cursor</em>)<em>
    </em><font color="#000080"><em><strong>ensure</strong></em></font><em>
        same_position</em>:<em> </em><a href="#same_position"><em>same_position</em></a><em> </em>(<em>a_cursor</em>)</pre>
</blockquote>

<pre><font color="#000080"><em><strong>feature</strong></em></font><font
color="#008000"> -- Removal</font></pre>

<blockquote>
    <pre><a name="wipe_out"><em>wipe_out</em></a><em>
        </em><font color="#008000">-- Remove all items from container.
        -- (From </font><a href="ds_container.html#wipe_out"><font
color="#008000"><em>DS_CONTAINER</em></font></a><font
color="#008000">.)</font><em>
    </em><font color="#000080"><em><strong>deferred
    ensure</strong></em></font><em>
        wiped_out</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a></pre>
</blockquote>

<pre><a name="invariant"><font color="#000080"><em><strong>invariant</strong></em></font></a></pre>

<blockquote>
    <pre><em>positive_count</em>:<em> </em><a href="#count"><em>count</em></a><em> </em>&gt;=<em> </em><font
color="#808000"><em>0</em></font><em>
empty_definition</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a><em> </em>= (<a
href="#count"><em>count</em></a><em> </em>=<em> </em><font
color="#808000"><em>0</em></font>)
    <font color="#008000">-- (From </font><a
href="ds_container.html#invariant"><font color="#008000"><em>DS_CONTAINER</em></font></a><font
color="#008000">.)</font></pre>
    <pre><em>empty_constraint</em>:<em> </em><a href="#is_empty"><em>is_empty</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em>
    </em><font color="#008000">-- (From </font><a
href="ds_traversable.html#invariant"><font color="#008000"><em>DS_TRAVERSABLE</em></font></a><font
color="#008000">.)</font></pre>
    <pre><em>after_constraint</em>:<em> </em><a href="#after"><em>after</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#off"><em>off</em></a><em>
    </em><font color="#008000">-- (From </font><a
href="ds_linear.html#invariant"><font color="#008000"><em>DS_LINEAR</em></font></a><font
color="#008000">.)</font></pre>
    <pre><em>not_both</em>:<em> </em><font color="#000080"><em><strong>not</strong></em></font><em> </em>(<a
href="#after"><em>after</em></a><em> </em><font color="#000080"><em><strong>and</strong></em></font><em> </em><a
href="#before"><em>before</em></a>)<em>
before_constraint</em>:<em> </em><a href="#before"><em>before</em></a><em> </em><font
color="#000080"><em><strong>implies</strong></em></font><em> </em><a
href="#off"><em>off</em></a></pre>
</blockquote>

<pre><font color="#000080"><em><strong>end</strong></em></font><font
color="#008000"> -- class DS_BILINEAR</font></pre>

<hr size="1">

<table border="0" width="100%">
    <tr>
        <td><address>
            <font size="2"><b>Copyright © 1999-2001</b></font><font
            size="1"><b>, </b></font><font size="2"><strong>Eric
            Bezault</strong></font><strong> </strong><font
            size="2"><br>
            <strong>mailto:</strong></font><a
            href="mailto:ericb@gobosoft.com"><font size="2">ericb@gobosoft.com</font></a><font
            size="2"><br>
            <strong>http:</strong></font><a
            href="http://www.gobosoft.com"><font size="2">//www.gobosoft.com</font></a><font
            size="2"><br>
            <strong>Last Updated:</strong> 31 March 2001</font><br>
            <!--webbot bot="PurpleText"
            preview="
$Date$
$Revision$"
            -->
        </address>
        </td>
        <td align="right" valign="top"><a
        href="http://www.gobosoft.com"><img
        src="../../image/home.gif" alt="Home" border="0"
        width="40" height="40"></a><a href="index.html"><img
        src="../../image/toc.gif" alt="Toc" border="0" width="40"
        height="40"></a><a href="ds_arrayed_stack.html"><img
        src="../../image/previous.gif" alt="Previous" border="0"
        width="40" height="40"></a><a
        href="ds_bilinear_cursor.html"><img
        src="../../image/next.gif" alt="Next" border="0"
        width="40" height="40"></a></td>
    </tr>
</table>
</body>
</html>
