Tim Holloway wrote:Here's a definition that sounds suitably pompous (corrected):
A Sequence is a linear Directed Acyclic Graph of elements in a collection (little-c!) such that all elements of the collection appear in the graph exactly once.
A sub-sequence, of course is simply a snippet extracted from a sequence.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Paul Anilprem wrote:tly.
Even if you try to access multiple elements of a data structure in parallel, for each element that you access, if you have to go through the exact same sequence of elements to reach that element, then that data structure is sequential. Otherwise, it is not. This is what I am trying to convey.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Tim Holloway wrote:
wikipedia wrote:In data structures, a data structure is said to have sequential access if one can only visit the values it contains in one particular order.
Said by whom? I'm surprised that this sloppy assertion hasn't been called out by the Wikipedia's editors. They don't generally admit that sort of thing. In fact, I've just called it out myself.
Tim Holloway wrote:
I think that the generally-accepted definition of sequential is that you can access members of a collection by enumerating them and always get them in the same, um, sequence. That is, the order of access is repeatable.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Paul Anilprem wrote:Your definition, though, does not help us determine whether an array is sequential or not because arrays do not have any intrinsic way to enumerate its items unlike other higher level data structures such as a Java Collection.
Until now, in this thread, no one has provided any reference to any authentic material that refutes this.
Stephan van Hulst wrote:
Paul Anilprem wrote:Your definition, though, does not help us determine whether an array is sequential or not because arrays do not have any intrinsic way to enumerate its items unlike other higher level data structures such as a Java Collection.
I'd say that applying the enhanced for-loop is the intrinsic way to enumerate the elements of an array.
Stephan van Hulst wrote:
Until now, in this thread, no one has provided any reference to any authentic material that refutes this.
Well, what would you consider an authentic material? In the end, it's all just an appeal to authority. What authority? The first person to use the term? The first person to adopt the term in a lexicon of computer science terms? The first person to bastardize a term borrowed from a field of mathematics?
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Mike Simmons wrote:Regarding Paul A's "I have 10 strings" question:
I would usually describe the two linked lists as sequential. I don't really care that there's more than one way to access it - both ways are sequential. The array, I wouldn't usually describe as sequential, but I would say you certainly can access it sequentially. On the other hand, I have no problem with someone describing it as sequential. Not exclusively sequential, of course.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Tim Holloway wrote:And finally, Java 23 is slated to make non-Collection collections sequentially accessible, or so I read it:
https://dev.to/msmittalas/sequenced-collections-an-upcoming-feature-of-java-21-to-handle-a-sequence-of-elements-in-a-better-way-1452
Paul Anilprem wrote:Q2: If the above interpretation is correct, I gather that the wiki definition of sequential is deemed incorrect by all of the participants except myself. Right?
Tim Holloway wrote:
A collection may or may not be sequentially accessible.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Paul Clapham wrote:
However I don't think that describing a thing as "sequential" is a helpful concept -- what does it even to mean to say that a Java array is "sequential"?
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Your mother is a hamster and your father smells of tiny ads!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|