indexing
description: "[
Subsets that are traversable linearly without commitment to a concrete
implementation.
]"
status: "See notice at end of class"
names: linear_subset, subset, set
access: membership
contents: generic
date: "$Date$"
revision: "$Revision$"
deferred class interface
LINEAR_SUBSET [G]
feature
has (v: G): BOOLEAN
v
object_comparison
CONTAINER
ensure CONTAINER
not_found_in_empty: Result implies not is_empty
index: INTEGER
item: G
TRAVERSABLE_SUBSET
require TRAVERSABLE_SUBSET
not_off: not off
feature
count: INTEGER
TRAVERSABLE_SUBSET
feature
disjoint (other: TRAVERSABLE_SUBSET [G]): BOOLEAN
other
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
is_subset (other: TRAVERSABLE_SUBSET [G]): BOOLEAN
other
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
is_superset (other: SUBSET [G]): BOOLEAN
other
SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
feature
after: BOOLEAN
TRAVERSABLE_SUBSET
before: BOOLEAN
extendible: BOOLEAN
COLLECTION
is_empty: BOOLEAN
TRAVERSABLE_SUBSET
is_inserted (v: G): BOOLEAN
v
COLLECTION
islast: BOOLEAN
object_comparison: BOOLEAN
equal=
=
CONTAINER
off: BOOLEAN
TRAVERSABLE_SUBSET
prunable: BOOLEAN
COLLECTION
valid_index (n: INTEGER): BOOLEAN
n
ensure
index_valid: 0 <= n and n <= count + 1
feature
compare_objects
equal
=
CONTAINER
require CONTAINER
changeable_comparison_criterion
ensure CONTAINER
object_comparison
compare_references
=
equal
CONTAINER
require CONTAINER
changeable_comparison_criterion
ensure CONTAINER
reference_comparison: not object_comparison
feature
forth
TRAVERSABLE_SUBSET
require TRAVERSABLE_SUBSET
not_after: not after
go_i_th (i: INTEGER)
i
require
valid_index: valid_index (i)
ensure
cursor_moved: index = i
start
TRAVERSABLE_SUBSET
feature
extend (v: G)
v
SETput
SET
require COLLECTION
extendible: extendible
ensure COLLECTION
item_inserted: is_inserted (v)
ensure then SET
in_set_already: old has (v) implies (count = old count)
added_to_set: not old has (v) implies (count = old count + 1)
fill (other: CONTAINER [G])
other
other
COLLECTION
require COLLECTION
other_not_void: other /= void
extendible
merge (other: CONTAINER [G])
other
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
move_item (v: G)
v
require
item_exists: v /= void
item_in_set: has (v)
put (v: G)
v
SETextend
SET
require COLLECTION
extendible: extendible
ensure COLLECTION
item_inserted: is_inserted (v)
ensure then SET
in_set_already: old has (v) implies (count = old count)
added_to_set: not old has (v) implies (count = old count + 1)
put_left (v: G)
v
require
item_exists: v /= void
not_before: not before
ensure
cursor_position_unchanged: index = old index + 1
feature
changeable_comparison_criterion: BOOLEAN
object_comparison
SET
ensure then SET
only_on_empty: Result = is_empty
prune (v: G)
v
SET
require COLLECTION
prunable: prunable
ensure then SET
removed_count_change: old has (v) implies (count = old count - 1)
not_removed_no_count_change: not old has (v) implies (count = old count)
item_deleted: not has (v)
prune_all (v: G)
v
object_comparison
COLLECTION
require COLLECTION
prunable
ensure COLLECTION
no_more_occurrences: not has (v)
remove
TRAVERSABLE_SUBSET
require TRAVERSABLE_SUBSET
not_off: not off
wipe_out
COLLECTION
require COLLECTION
prunable
ensure COLLECTION
wiped_out: is_empty
feature
linear_representation: LINEAR [G]
CONTAINER
feature
duplicate (n: INTEGER): like Current
ncount
SUBSET
require SUBSET
non_negative: n >= 0
ensure SUBSET
correct_count_1: n <= count implies Result.count = n
correct_count_2: n >= count implies Result.count = count
feature
intersect (other: TRAVERSABLE_SUBSET [G])
other
otheris_empty
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
ensure SUBSET
is_subset_other: is_subset (other)
subtract (other: TRAVERSABLE_SUBSET [G])
other
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
ensure SUBSET
is_disjoint: disjoint (other)
symdif (other: TRAVERSABLE_SUBSET [G])
other
other
TRAVERSABLE_SUBSET
require SUBSET
set_exists: other /= void
same_rule: object_comparison = other.object_comparison
invariant
before_definition: before = (index = 0)
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
TRAVERSABLE_SUBSET
empty_definition: is_empty = (count = 0)
count_range: count >= 0
indexing
library: "[
EiffelBase: Library of reusable components for Eiffel.
]"
status: "[
Copyright 1986-2001 Interactive Software Engineering (ISE).
For ISE customers the original versions are an ISE product
covered by the ISE Eiffel license and support agreements.
]"
license: "[
EiffelBase may now be used by anyone as FREE SOFTWARE to
develop any product, public-domain or commercial, without
payment to ISE, under the terms of the ISE Free Eiffel Library
License (IFELL) at http://eiffel.com/products/base/license.html.
]"
source: "[
Interactive Software Engineering Inc.
ISE Building
360 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Electronic mail <info@eiffel.com>
Customer support http://support.eiffel.com
]"
info: "[
For latest info see award-winning pages: http://eiffel.com
]"
end -- LINEAR_SUBSET