Intersecting data question/challenge
Jon
jbondy at sover.net
Fri Jul 8 22:41:50 EDT 2005
Whoops! Sorry!
:)
Dennis Brown wrote:
> Jon,
>
> Unless I am not understanding your suggestion, that is the method
> used to start off this thread.
>
> Dennis
>
> On Jul 8, 2005, at 6:49 PM, Jon wrote:
>
>> How about loading a string with the numbers from one list,
>> represented as strings (1 ==> "001", etc) appended and separated by
>> spaces or commas.
>>
>> Then run through the second number list searching for each number in
>> the above string?
>>
>> Hugely clunky, due to Rev's sloth, but it might be faster.
>>
>> I *@(*%# hate it when one has to jump through these kinds of hoops
>> to make something work fast enough. I have better things to do with
>> my time. Sigh.
>>
>> :)
>>
>> Jon
>>
>>
>> Chris Sheffield wrote:
>>
>>
>>> Could you make use of the split command somehow? You would have
>>> to format your lists a little differently, but if you did it right
>>> and specified a primary and secondary delimiter, you might be able
>>> to get quick results and still take advantage of the intersect
>>> command. Anyway, just another idea.
>>>
>>> Chris Sheffield
>>>
>>>
>>> On Jul 8, 2005, at 12:50 PM, Dennis Brown wrote:
>>>
>>>
>>>> Eric,
>>>>
>>>> Yes, I looked at the intersect command, but it performs the
>>>> action on the keys not the data from a list. I would have to
>>>> create an array element for each integer in the list with the
>>>> integer as the key. Sounded like two loops that would run even
>>>> slower than my example:
>>>>
>>>> repeat for each item theItem in list1
>>>> put empty into myArray1[theItem]
>>>> end repeat
>>>> repeat for each item theItem in list2
>>>> put empty into myArray2[theItem]
>>>> end repeat
>>>> intersect myArray1 with myArray2
>>>> if the keys of myArray1 is empty then get false else get true
>>>>
>>>> In actual practice, the above example runs 3 times slower than
>>>> the below example for the sample data shown.
>>>>
>>>> However, knowing that Rev had such a command for the keys, I
>>>> thought perhaps someone knew of a more clever way to use it, or
>>>> maybe there was another way to intersect data.
>>>>
>>>> Dennis
>>>>
>>>
>>>
>>> ------------------------------------------
>>> Chris Sheffield
>>> Read Naturally
>>> The Fluency Company
>>> http://www.readnaturally.com
>>> ------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list