(j3.2006) reverse section contiguous?
John Reid
John.Reid
Sun Jan 8 14:38:16 EST 2012
Bill Long wrote:
>
> On 1/5/12 4:43 PM, John Reid wrote:
>>
>> Dick Hendrickson wrote:
>>> On Thu, Jan 5, 2012 at 12:56 PM, Bill Long<longb at cray.com> wrote:
>>>> The question arose as to, given
>>>>
>>>> real x(10)
>>>>
>>>> whether
>>>>
>>>> x(10:1:-1)
>>>>
>>>> is CONTIGUOUS.
>>>>
>>>> The relevant part of the "is contiguous" rules is
>>>>
>>>> "An object is contiguous if it is ...
>>>>
>>>> (6) a nonzero-sized array section (6.5.3) provided that ...
>>>>
>>>> (c) the elements of the section, in array element order, are a subset
>>>> of
>>>> the base object elements that are consecutive in array element order,"
>>>>
>>>> The elements of the section are {A(10), A(9), A(8), ..., A(1)}
>>>> which, as a
>>>> set of elements, is a subset of {A(1), A(2), ..., A(10)}. (Perhaps
>>>> "subset"
>>>> is a flawed word here.)
>>>>
>
> The replies from Dick and John below match what I thought was the
> intent. It might be clearer above if we said "the sequence of the
> elements of the section, in array element order, is {part | a
> subsequence } of the sequence of base object elements that are
> consecutive in array element order".
I think this is worth an interp. even if we make no edits. For an edit,
I suggest more the radical rewrite:
(c) the sequence of elements of the section, in array element order, is
a subsequence of the sequence of elements of the base object, in array
element order,"
John.
More information about the J3
mailing list