Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36682 > unrolled thread
| Started by | Eric Douglas <e.d.programmer@gmail.com> |
|---|---|
| First post | 2017-06-20 12:18 -0700 |
| Last post | 2017-06-25 12:20 +0200 |
| Articles | 5 on this page of 25 — 8 participants |
Back to article view | Back to comp.lang.java.programmer
How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-20 12:18 -0700
Re: How to parse an array? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-06-20 14:49 -0500
Re: How to parse an array? Arne Vajhøj <arne@vajhoej.dk> - 2017-06-20 16:15 -0400
Re: How to parse an array? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-20 16:23 -0400
Re: How to parse an array? Robert Klemme <shortcutter@googlemail.com> - 2017-06-24 12:02 +0200
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-26 05:10 -0700
Re: How to parse an array? Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-26 09:36 -0400
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-26 07:47 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-26 15:47 +0000
Re: How to parse an array? Arne Vajhøj <arne@vajhoej.dk> - 2017-06-26 20:37 -0400
Re: How to parse an array? lewbloch@gmail.com - 2017-06-27 12:29 -0700
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-27 12:50 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-27 20:05 +0000
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-27 14:01 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-27 22:34 +0000
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 05:10 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-28 19:09 +0000
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 13:02 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-28 21:55 +0000
Re: How to parse an array? Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 06:10 -0700
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-30 16:52 +0000
Re: How to parse an array? Jerry Stuckle <jstucklex@attglobal.net> - 2017-06-24 16:34 -0400
Re: How to parse an array? Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-24 22:42 +0000
Re: How to parse an array? Jerry Stuckle <jstucklex@attglobal.net> - 2017-06-24 20:05 -0400
Re: How to parse an array? Robert Klemme <shortcutter@googlemail.com> - 2017-06-25 12:20 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2017-06-30 16:52 +0000 |
| Message-ID | <oj5vjn$n4e$1@dont-email.me> |
| In reply to | #36776 |
On Fri, 30 Jun 2017 06:10:48 -0700, Eric Douglas wrote: > Nice, I'm not sure I did exactly everything you were suggesting but it > seems I get barely a 1 second delay now on clicking a column header to > sort the table. That is on a full table, tested 74,707 rows, 24 > columns, totaling 1,792,968 cells. > > That is with the full sort processing, I can click one column to be > ascending or descending, then a second column with duplicate values > which remain sorted on the first column as secondary. > > That is with full search capability. I have 2 JTextComponent controls > with key listeners that update the table search, each linked to list > buttons where I can select to search on any specific column or all > columns. All cells indexed, with wildcards. > > That includes mixed cell styles. Some cells are just text, some are > masked numbers, some are masked dates, some are list buttons. Excellent! I'm really pleased to hear that the change has got you a 300% speedup. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2017-06-24 16:34 -0400 |
| Message-ID | <oimi4i$9ko$1@jstuckle.eternal-september.org> |
| In reply to | #36682 |
On 6/20/2017 3:29 PM, Stefan Ram wrote: > Eric Douglas <e.d.programmer@gmail.com> writes: >> I'm writing a method to take 2 arrays and return the subset of the first array. > > »The subset of the first array« makes no sense in English, > because > It makes perfect sense in the mathematical realm. A set is a group of values (or similar). A subset is another group of values, all of which are members of the original set. The subset may contain all of the values in the original set, or only some of the values in the original set. But it does not contain any values not in the original set. In this particular case, a subset of the array would be another array containing some (or all) of the values in the original array. His English is very clear. It's not his fault your understanding is lacking. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2017-06-24 22:42 +0000 |
| Message-ID | <oimps5$g3v$1@dont-email.me> |
| In reply to | #36715 |
On Sat, 24 Jun 2017 16:34:08 -0400, Jerry Stuckle wrote: > On 6/20/2017 3:29 PM, Stefan Ram wrote: >> Eric Douglas <e.d.programmer@gmail.com> writes: >>> I'm writing a method to take 2 arrays and return the subset of the >>> first array. >> >> »The subset of the first array« makes no sense in English, >> because >> >> > It makes perfect sense in the mathematical realm. A set is a group of > values (or similar). A subset is another group of values, all of which > are members of the original set. The subset may contain all of the > values in the original set, or only some of the values in the original > set. But it does not contain any values not in the original set. > However, this doesn't apply to the OP's example code. His larger array contains alphabetic valueds, while the second list contains integer values, IOW it is not a subset of the first array. > In this particular case, a subset of the array would be another array > containing some (or all) of the values in the original array. > But that's not what it contains. In fact it looks as though its meant to be a list of subscripts referencing the first array. I don't know what I'd call it other than a list of subscripts, but it clearly doesn't match your definition of a subset. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2017-06-24 20:05 -0400 |
| Message-ID | <oimug5$tk5$1@jstuckle.eternal-september.org> |
| In reply to | #36716 |
On 6/24/2017 6:42 PM, Martin Gregorie wrote: > On Sat, 24 Jun 2017 16:34:08 -0400, Jerry Stuckle wrote: > >> On 6/20/2017 3:29 PM, Stefan Ram wrote: >>> Eric Douglas <e.d.programmer@gmail.com> writes: >>>> I'm writing a method to take 2 arrays and return the subset of the >>>> first array. >>> >>> »The subset of the first array« makes no sense in English, >>> because >>> >>> >> It makes perfect sense in the mathematical realm. A set is a group of >> values (or similar). A subset is another group of values, all of which >> are members of the original set. The subset may contain all of the >> values in the original set, or only some of the values in the original >> set. But it does not contain any values not in the original set. >> > However, this doesn't apply to the OP's example code. His larger array > contains alphabetic valueds, while the second list contains integer > values, IOW it is not a subset of the first array. > >> In this particular case, a subset of the array would be another array >> containing some (or all) of the values in the original array. >> > But that's not what it contains. > > In fact it looks as though its meant to be a list of subscripts > referencing the first array. I don't know what I'd call it other than a > list of subscripts, but it clearly doesn't match your definition of a > subset. > > But yes, it does. He has an ArrayList with values. This is a set. He wants another ArrayList containing selected values from the first. That is a subset. The OP is discussing the design. Whether it uses ArrayLists or any other collections is an implementation detail. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Date | 2017-06-25 12:20 +0200 |
| Message-ID | <er9h3nFqgrmU1@mid.individual.net> |
| In reply to | #36716 |
On 25.06.2017 00:42, Martin Gregorie wrote:
> On Sat, 24 Jun 2017 16:34:08 -0400, Jerry Stuckle wrote:
>
>> On 6/20/2017 3:29 PM, Stefan Ram wrote:
>>> Eric Douglas <e.d.programmer@gmail.com> writes:
>>>> I'm writing a method to take 2 arrays and return the subset of the
>>>> first array.
>>>
>>> »The subset of the first array« makes no sense in English,
>>> because
>>>
>>>
>> It makes perfect sense in the mathematical realm. A set is a group of
>> values (or similar). A subset is another group of values, all of which
>> are members of the original set. The subset may contain all of the
>> values in the original set, or only some of the values in the original
>> set. But it does not contain any values not in the original set.
>>
> However, this doesn't apply to the OP's example code. His larger array
> contains alphabetic valueds, while the second list contains integer
> values, IOW it is not a subset of the first array.
No, but the result is.
>> In this particular case, a subset of the array would be another array
>> containing some (or all) of the values in the original array.
>>
> But that's not what it contains.
I am with Jerry here: the result ("retval") does indeed contain a subset
of the entries in "list1", because it does contain some values from it.
> In fact it looks as though its meant to be a list of subscripts
> referencing the first array. I don't know what I'd call it other than a
> list of subscripts, but it clearly doesn't match your definition of a
> subset.
Yes, "list2" is a list of subscripts or indexes. But Eric never talked
about that as a subset. He wants to _return_ a "subset of the first
array" (see above) - "list1" and "list2" are obviously the inputs.
You may claim that Eric's wording is imprecise (e.g. he does not explain
the role of sorting the result) and a lot of context is lacking which
prevents us from fully assessing the fitness of his approach - but the
problem does make sense and he specifically does not abuse the term
"subset".
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.java.programmer
csiph-web