Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "Multi-dimensional array" legal: "See notice at end of class." status: "See notice at end of class." representation: array access: multi_dimensional_index size: resizable contents: generic date: "$Date: 2017-04-13 08:44:06 -0800 (Thu, 13 Apr 2017) $" revision: "$Revision: 100177 $" class interface ECOM_ARRAY [G -> ] create make (a_dimension_count: INTEGER_32; some_lower_indices, some_element_counts: ARRAY [INTEGER_32]) -- Create a_dimensional_count dimensional array -- with lower indices in each dimension as described by some_lower_indices -- and element count in each dimension as described by some_element_counts. require valid_dimension_count: a_dimension_count >= 0 valid_lower_indices: some_lower_indices /= Void and then some_lower_indices.count = a_dimension_count and (a_dimension_count > 0 implies some_lower_indices.lower = 1) valid_element_count: some_element_counts /= Void and then some_element_counts.count = a_dimension_count and (a_dimension_count > 0 implies some_element_counts.lower = 1) and then are_element_counts_valid (some_element_counts) ensure valid_dimension_count: dimension_count >= 0 valid_element_counts: element_counts /= Void and then element_counts.count = dimension_count valid_lower_indices: lower_indices /= Void and then lower_indices.count = dimension_count valid_upper_indices: upper_indices /= Void and then upper_indices.count = dimension_count make_from_array (a: ARRAY [G]; a_dimension_count: INTEGER_32; some_lower_indices, some_element_counts: ARRAY [INTEGER_32]) -- Create a_dimensional_count dimensional array -- with lower indices in each dimension as described by some_lower_indices -- and element count in each dimension as described by some_element_counts. require valid_dimension_count: a_dimension_count >= 0 valid_lower_indices: some_lower_indices /= Void and then some_lower_indices.count = a_dimension_count and (a_dimension_count > 0 implies some_lower_indices.lower = 1) valid_element_count: some_element_counts /= Void and then some_element_counts.count = a_dimension_count and (a_dimension_count > 0 implies some_element_counts.lower = 1) and then are_element_counts_valid (some_element_counts) valid_array_size: a.count >= total_count (some_element_counts) ensure valid_dimension_count: dimension_count >= 0 valid_element_counts: element_counts /= Void and then element_counts.count = dimension_count valid_lower_indices: lower_indices /= Void and then lower_indices.count = dimension_count valid_upper_indices: upper_indices /= Void and then upper_indices.count = dimension_count make_empty -- Create empty array. feature -- Initialization initialize (v: G) -- Make each entry have value v array_make_empty -- Allocate empty array starting at 1. -- (from ARRAY) ensure -- from ARRAY lower_set: lower = 1 upper_set: upper = 0 items_set: all_default make_filled (a_default_value: G; min_index, max_index: INTEGER_32) -- Allocate array; set index interval to -- min_index .. max_index; set all values to default. -- (Make array empty if min_index = max_index + 1). -- (from ARRAY) require -- from ARRAY valid_bounds: min_index <= max_index + 1 ensure -- from ARRAY lower_set: lower = min_index upper_set: upper = max_index items_set: filled_with (a_default_value) array_make_from_array (a: ARRAY [G]) -- Initialize from the items of a. -- (Useful in proper descendants of class ARRAY, -- to initialize an array-like object from a manifest array.) -- (from ARRAY) require -- from ARRAY array_exists: a /= Void ensure -- from ARRAY shared: area = a.area lower_set: lower = a.lower upper_set: upper = a.upper make_from_cil (na: NATIVE_ARRAY [like array_item]) -- Initialize array from na. -- (from ARRAY) require -- from ARRAY is_dotnet: {PLATFORM}.is_dotnet na_not_void: na /= Void make_from_special (a: SPECIAL [G]) -- Initialize Current from items of a. -- (from ARRAY) require -- from ARRAY special_attached: a /= Void ensure -- from ARRAY shared: area = a lower_set: lower = 1 upper_set: upper = a.count feature -- Access area: SPECIAL [G] -- Special data zone. -- (from TO_SPECIAL) at alias "@" (i: INTEGER_32): G assign array_put -- Entry at index i, if in index interval. -- Was declared in {ARRAY} as synonym of `item`. -- (from ARRAY) require -- from TABLE valid_key: valid_index (i) require -- from TO_SPECIAL valid_index: valid_index (i) entry (i: INTEGER_32): G -- Entry at index i, if in index interval. -- (from ARRAY) require -- from ARRAY valid_key: valid_index (i) generating_type: TYPE [ECOM_ARRAY [G]] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty has (v: G): BOOLEAN -- Does v appear in array? -- (Reference or object equality, -- based on `object_comparison`.) -- (from ARRAY) ensure -- from CONTAINER not_found_in_empty: Result implies not is_empty item (some_indices: ARRAY [INTEGER_32]): G -- Entry at some_indices require valid_indices: are_indices_valid (some_indices) array_item (i: INTEGER_32): G assign array_put -- Entry at index i, if in index interval. -- Was declared in {ARRAY} as synonym of `at`. -- (from ARRAY) require -- from TABLE valid_key: valid_index (i) require -- from READABLE_INDEXABLE valid_index: valid_index (i) require -- from TO_SPECIAL valid_index: valid_index (i) new_cursor: ARRAY_ITERATION_CURSOR [G] -- Fresh cursor associated with current structure -- (from ARRAY) require -- from ITERABLE True ensure -- from ITERABLE result_attached: Result /= Void feature -- Measurement additional_space: INTEGER_32 -- Proposed number of additional items -- (from RESIZABLE) ensure -- from RESIZABLE at_least_one: Result >= 1 capacity: INTEGER_32 -- Number of available indices. -- Was declared in {ARRAY} as synonym of `count`. -- (from ARRAY) require -- from BOUNDED True ensure -- from BOUNDED capacity_non_negative: Result >= 0 ensure then -- from ARRAY consistent_with_bounds: Result = upper - lower + 1 count: INTEGER_32 -- Number of available indices. -- Was declared in {ARRAY} as synonym of `capacity`. -- (from ARRAY) require -- from FINITE True ensure -- from FINITE count_non_negative: Result >= 0 ensure then -- from ARRAY consistent_with_bounds: Result = upper - lower + 1 dimension_count: INTEGER_32 -- Number of dimensions element_counts: ARRAY [INTEGER_32] -- Element count in each dimension Growth_percentage: INTEGER_32 = 50 -- Percentage by which structure will grow automatically -- (from RESIZABLE) lower: INTEGER_32 -- Minimum index. -- (from ARRAY) lower_indices: ARRAY [INTEGER_32] -- Lower indedeces in each dimension Minimal_increase: INTEGER_32 = 5 -- Minimal number of additional items -- (from RESIZABLE) occurrences (v: G): INTEGER_32 -- Number of times v appears in structure. -- (from ARRAY) ensure -- from BAG non_negative_occurrences: Result >= 0 upper: INTEGER_32 -- Maximum index. -- (from ARRAY) upper_indices: ARRAY [INTEGER_32] -- Upper indices in each dimension feature -- Comparison frozen deep_equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: ECOM_ARRAY [G]): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: ECOM_ARRAY [G]): BOOLEAN -- Is array made of the same items as other? -- (from ARRAY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "" (other: ECOM_ARRAY [G]): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report all_default: BOOLEAN -- Are all items set to default values? -- (from ARRAY) ensure -- from ARRAY definition: Result = (count = 0 or else ((not attached array_item (upper) as i or else i = ({G}).default) and subarray (lower, upper - 1).all_default)) are_element_counts_consistent: BOOLEAN -- Are `element_counts` consistent? are_element_counts_valid (some_element_counts: ARRAY [INTEGER_32]): BOOLEAN -- Are some_element_counts valid element counts? require non_void_element_counts: some_element_counts /= Void valid_element_counts: some_element_counts.count > 0 implies some_element_counts.lower = 1 are_indices_large_enough (some_indices: ARRAY [INTEGER_32]): BOOLEAN -- Are some_indices large enough? are_indices_valid (some_indices: ARRAY [INTEGER_32]): BOOLEAN -- Are some_indices valid indices? changeable_comparison_criterion: BOOLEAN -- May `object_comparison` be changed? -- (Answer: yes by default.) -- (from CONTAINER) conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void extendible: BOOLEAN -- May items be added? -- (Answer: no, although array may be resized.) -- (from ARRAY) filled_with (v: G): BOOLEAN -- Are all items set to v? -- (from ARRAY) ensure -- from ARRAY definition: Result = (count = 0 or else (array_item (upper) = v and subarray (lower, upper - 1).filled_with (v))) full: BOOLEAN -- Is structure filled to capacity? -- (Answer: yes) -- (from ARRAY) require -- from BOX True is_empty: BOOLEAN -- Is structure empty? -- (from FINITE) require -- from CONTAINER True is_inserted (v: G): BOOLEAN -- Has v been inserted by the most recent insertion? -- (By default, the value returned is equivalent to calling -- has (v). However, descendants might be able to provide more -- efficient implementations.) -- (from COLLECTION) object_comparison: BOOLEAN -- Must search operations use `equal` rather than = -- for comparing references? (Default: no, use =.) -- (from CONTAINER) prunable: BOOLEAN -- May items be removed? -- (Answer: no.) -- (from ARRAY) resizable: BOOLEAN -- Can array be resized automatically? -- (from ARRAY) require -- from BOUNDED True same_items (other: ECOM_ARRAY [G]): BOOLEAN -- Do other and Current have same items? -- (from ARRAY) require -- from ARRAY other_not_void: other /= Void ensure -- from ARRAY definition: Result = (count = other.count and then (count = 0 or else (array_item (upper) = other.array_item (other.upper) and subarray (lower, upper - 1).same_items (other.subarray (other.lower, other.upper - 1))))) same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) total_count (some_element_counts: ARRAY [INTEGER_32]): INTEGER_32 -- Total number of elements require valid_counts: are_element_counts_valid (some_element_counts) ensure valid_count: Result >= 0 valid_index (i: INTEGER_32): BOOLEAN -- Is i within the bounds of the array? -- (from ARRAY) require -- from READABLE_INDEXABLE True require -- from TABLE True require -- from TO_SPECIAL True ensure -- from READABLE_INDEXABLE only_if_in_index_set: Result implies (lower <= i and i <= upper) feature -- Status setting compare_objects -- Ensure that future search operations will use `equal` -- rather than = for comparing references. -- (from CONTAINER) require -- from CONTAINER changeable_comparison_criterion: changeable_comparison_criterion ensure -- from CONTAINER object_comparison compare_references -- Ensure that future search operations will use = -- rather than `equal` for comparing references. -- (from CONTAINER) require -- from CONTAINER changeable_comparison_criterion: changeable_comparison_criterion ensure -- from CONTAINER reference_comparison: not object_comparison feature -- Element change enter (v: like array_item; i: INTEGER_32) -- Replace i-th entry, if in index interval, by v. -- (from ARRAY) require -- from ARRAY valid_key: valid_index (i) fill (other: CONTAINER [G]) -- Fill with as many items of other as possible. -- The representations of other and current structure -- need not be the same. -- (from COLLECTION) require -- from COLLECTION other_not_void: other /= Void extendible: extendible fill_with (v: G) -- Set items between `lower` and `upper` with v. -- (from ARRAY) ensure -- from ARRAY same_capacity: capacity = old capacity count_definition: count = old count filled: filled_with (v) array_force (v: like array_item; i: INTEGER_32) -- Assign item v to i-th entry. -- Resize the array if i falls out of currently defined bounds; preserve existing items. -- In void-safe mode, if ({G}).has_default does not hold, then you can only insert between -- lower - 1 and upper + 1 positions in the ARRAY. -- (from ARRAY) require -- from ARRAY has_default_if_too_low: (i < lower - 1 and lower /= {like lower}.min_value) implies ({G}).has_default has_default_if_too_high: (i > upper + 1 and upper /= {like upper}.max_value) implies ({G}).has_default ensure -- from ARRAY inserted: array_item (i) = v higher_count: count >= old count lower_set: lower = (old lower).min (i) upper_set: upper = (old upper).max (i) force (v: like item; some_indices: ARRAY [INTEGER_32]) -- Assign item v at indices some_indices. -- Resize if necessary. require valid_indices: are_indices_large_enough (some_indices) ensure element_inserted: item (some_indices) = v force_and_fill (v: like array_item; i: INTEGER_32) -- Assign item v to i-th entry. -- If i falls out of currently defined bounds: -- - Resize array as needed. -- - Fill in any new entry (in addition to the one at position i with value v). -- - Preserve existing items. -- (from ARRAY) ensure -- from ARRAY inserted: array_item (i) = v filled_below_lower: c: i |..| old lower ¦ c < old lower implies array_item (c) = v filled_above_upper: c: old upper |..| i ¦ c > old upper implies array_item (c) = v higher_count: count >= old count lower_set: lower = (old lower).min (i) upper_set: upper = (old upper).max (i) put (v: like item; some_indices: ARRAY [INTEGER_32]) -- Assign item v at indices some_indices. require valid_indices: are_indices_valid (some_indices) ensure element_inserted: item (some_indices) = v array_put (v: like array_item; i: INTEGER_32) -- Replace i-th entry, if in index interval, by v. -- (from ARRAY) require -- from TABLE valid_key: valid_index (i) require -- from TABLE valid_key: valid_index (i) require -- from TO_SPECIAL valid_index: valid_index (i) ensure -- from TABLE inserted: array_item (i) = v ensure -- from TO_SPECIAL inserted: array_item (i) = v subcopy (other: ARRAY [like array_item]; start_pos, end_pos, index_pos: INTEGER_32) -- Copy items of other within bounds start_pos and end_pos -- to current array starting at index index_pos. -- (from ARRAY) require -- from ARRAY other_not_void: other /= Void valid_start_pos: start_pos >= other.lower valid_end_pos: end_pos <= other.upper valid_bounds: start_pos <= end_pos + 1 valid_index_pos: index_pos >= lower enough_space: (upper - index_pos) >= (end_pos - start_pos) feature -- Removal clear_all -- Reset all items to default values. -- (from ARRAY) require -- from ARRAY has_default: ({G}).has_default ensure -- from ARRAY stable_lower: lower = old lower stable_upper: upper = old upper default_items: all_default discard_items -- Remove all elements require -- from ARRAY has_default: ({G}).has_default ensure -- from ARRAY default_items: all_default keep_head (n: INTEGER_32) -- Remove all items except for the first n; -- do nothing if n >= `count`. -- (from ARRAY) require -- from ARRAY non_negative_argument: n >= 0 ensure -- from ARRAY new_count: count = n.min (old count) same_lower: lower = old lower keep_tail (n: INTEGER_32) -- Remove all items except for the last n; -- do nothing if n >= `count`. -- (from ARRAY) require -- from ARRAY non_negative_argument: n >= 0 ensure -- from ARRAY new_count: count = n.min (old count) same_upper: upper = old upper prune_all (v: G) -- Remove all occurrences of v. -- (Reference or object equality, -- based on `object_comparison`.) -- (from COLLECTION) require -- from COLLECTION prunable: prunable ensure -- from COLLECTION no_more_occurrences: not has (v) remove_head (n: INTEGER_32) -- Remove first n items; -- if n > `count`, remove all. -- (from ARRAY) require -- from ARRAY n_non_negative: n >= 0 ensure -- from ARRAY new_count: count = (old count - n).max (0) same_upper: upper = old upper remove_tail (n: INTEGER_32) -- Remove last n items; -- if n > `count`, remove all. -- (from ARRAY) require -- from ARRAY n_non_negative: n >= 0 ensure -- from ARRAY new_count: count = (old count - n).max (0) same_lower: lower = old lower feature -- Resizing automatic_grow -- Change the capacity to accommodate at least -- `growth_percentage` more items. -- (from RESIZABLE) require -- from RESIZABLE resizable: resizable ensure -- from RESIZABLE increased_capacity: capacity >= old capacity + old additional_space conservative_resize_with_default (a_default_value: G; min_index, max_index: INTEGER_32) -- Rearrange array so that it can accommodate -- indices down to min_index and up to max_index. -- Do not lose any previously entered item. -- (from ARRAY) require -- from ARRAY good_indices: min_index <= max_index ensure -- from ARRAY no_low_lost: lower = min_index or else lower = old lower no_high_lost: upper = max_index or else upper = old upper grow (i: INTEGER_32) -- Change the capacity to at least i. -- (from ARRAY) require -- from RESIZABLE resizable: resizable ensure -- from RESIZABLE new_capacity: capacity >= i rebase (a_lower: like lower) -- Without changing the actual content of Current we set `lower` to a_lower -- and `upper` accordingly to a_lower + count - 1. -- (from ARRAY) ensure -- from ARRAY lower_set: lower = a_lower upper_set: upper = a_lower + old count - 1 resize (n_upper_indices: ARRAY [INTEGER_32]) -- Rearrange array so that it can accommodate n_upper_indices -- without losing any previously entered items -- or changing their indices; -- do nothing if possible. require are_indices_large_enough (n_upper_indices) trim -- Decrease `capacity` to the minimum value. -- Apply to reduce allocated storage. -- (from ARRAY) require -- from RESIZABLE True ensure -- from RESIZABLE same_count: count = old count minimal_capacity: capacity = count ensure then -- from ARRAY same_items: same_items (old twin) feature -- Conversion linear_representation: LINEAR [G] -- Representation as a linear structure. -- (from ARRAY) to_c: ANY -- Address of actual sequence of values, -- for passing to external (non-Eiffel) routines. -- (from ARRAY) require -- from ARRAY not_is_dotnet: not {PLATFORM}.is_dotnet to_cil: NATIVE_ARRAY [G] -- Address of actual sequence of values, -- for passing to external (non-Eiffel) routines. -- (from ARRAY) require -- from ARRAY is_dotnet: {PLATFORM}.is_dotnet ensure -- from ARRAY to_cil_not_void: Result /= Void to_special: SPECIAL [G] -- 'area'. -- (from ARRAY) ensure -- from ARRAY to_special_not_void: Result /= Void feature -- Duplication copy (other: ECOM_ARRAY [G]) -- Reinitialize by copying all the items of other. -- (This is also used by `clone`.) -- (from ARRAY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other ensure then -- from ARRAY equal_areas: area ~ other.area frozen deep_copy (other: ECOM_ARRAY [G]) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: ECOM_ARRAY [G] -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: ECOM_ARRAY [G]) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: ECOM_ARRAY [G] -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) subarray (start_pos, end_pos: INTEGER_32): ARRAY [G] -- Array made of items of current array within -- bounds start_pos and end_pos. -- (from ARRAY) require -- from ARRAY valid_start_pos: lower <= start_pos valid_end_pos: end_pos <= upper valid_bounds: (start_pos <= end_pos) or (start_pos = end_pos + 1) ensure -- from ARRAY lower: Result.lower = start_pos upper: Result.upper = end_pos frozen twin: ECOM_ARRAY [G] -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: ECOM_ARRAY [G] -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Inapplicable bag_put (v: G) -- Ensure that structure includes v. -- (from TABLE) require -- from COLLECTION extendible: extendible ensure -- from COLLECTION item_inserted: is_inserted (v) extend (v: G) -- Add v to structure. -- (Precondition is False.) -- (from ARRAY) require -- from COLLECTION extendible: extendible ensure -- from COLLECTION item_inserted: is_inserted (v) prune (v: G) -- Remove first occurrence of v if any. -- (Precondition is False.) -- (from ARRAY) require -- from COLLECTION prunable: prunable feature -- Iteration do_all (action: PROCEDURE [G]) -- Apply action to every item, from first to last. -- Semantics not guaranteed if action changes the structure; -- in such a case, apply iterator to clone of structure instead. -- (from ARRAY) require -- from ARRAY action_not_void: action /= Void do_all_with_index (action: PROCEDURE [G, INTEGER_32]) -- Apply action to every item, from first to last. -- action receives item and its index. -- Semantics not guaranteed if action changes the structure; -- in such a case, apply iterator to clone of structure instead. -- (from ARRAY) do_if (action: PROCEDURE [G]; test: FUNCTION [G, BOOLEAN]) -- Apply action to every item that satisfies test, from first to last. -- Semantics not guaranteed if action or test changes the structure; -- in such a case, apply iterator to clone of structure instead. -- (from ARRAY) require -- from ARRAY action_not_void: action /= Void test_not_void: test /= Void do_if_with_index (action: PROCEDURE [G, INTEGER_32]; test: FUNCTION [G, INTEGER_32, BOOLEAN]) -- Apply action to every item that satisfies test, from first to last. -- action and test receive the item and its index. -- Semantics not guaranteed if action or test changes the structure; -- in such a case, apply iterator to clone of structure instead. -- (from ARRAY) for_all (test: FUNCTION [G, BOOLEAN]): BOOLEAN -- Is test true for all items? -- (from ARRAY) require -- from ARRAY test_not_void: test /= Void there_exists (test: FUNCTION [G, BOOLEAN]): BOOLEAN -- Is test true for at least one item? -- (from ARRAY) require -- from ARRAY test_not_void: test /= Void feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void invariant consistent_upper_indices: upper_indices.count = dimension_count consistent_lower_indices: lower_indices.count = dimension_count consistent_element_counts: are_element_counts_consistent consistent_size: capacity = total_count (element_counts) non_negative_count: count >= 0 -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) -- from ARRAY area_exists: area /= Void consistent_size: capacity = upper - lower + 1 non_negative_count: count >= 0 -- from RESIZABLE increase_by_at_least_one: Minimal_increase >= 1 -- from BOUNDED valid_count: count <= capacity full_definition: full = (count = capacity) -- from FINITE empty_definition: is_empty = (count = 0) -- from READABLE_INDEXABLE consistent_boundaries: lower <= upper or else lower = upper + 1 note copyright: "Copyright (c) 1984-2017, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class ECOM_ARRAY
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org