473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

search algorithms

I am having trouble with creating / finding effective searching algorithms.
I constantly run into a situation where I have a list of objects and need to
find out if a property of one of these objects matches some
criteria...especialy if the criteria is a list itself. Example...

class Part has private PartID

A listview of items with each tag having a Part object.
I have an array of PartID's denoting the parts I want to remove from the
list.
The listview has a few hundred thousands records.

when the list is large like this, looping through the list mulltiple times
takes a long time. I am basicaly looking for seom direction on how to think
about developing structures with searching in mind using existing controls.

Thanks in advance
dec
Nov 15 '05 #1
1 2598

and by going through them, he means: do a binary search on
the sorted list. Take a look at the Array class. It has
everything in it. You only need to implement the
IComparable interface in your data class.

Greetings,
BV
-----Original Message-----
Decrypted,

I guess you better sort them first in an order that you feel is better foryour project, and then go through them.
The attached is a list of emails from "Gregory A. Beamer" of differnetmethod of sorting.

Hope it helps.

Sasha

---------

"decrypted" <de*******@earthlink.net> wrote in message
news:OT**************@TK2MSFTNGP09.phx.gbl...
I am having trouble with creating / finding effective searching
algorithms.
I constantly run into a situation where I have a list
of objects and needto
find out if a property of one of these objects matches
some criteria...especialy if the criteria is a list itself. Example...
class Part has private PartID

A listview of items with each tag having a Part object.
I have an array of PartID's denoting the parts I want to remove from the list.
The listview has a few hundred thousands records.

when the list is large like this, looping through the list mulltiple times takes a long time. I am basicaly looking for seom

direction on how tothink
about developing structures with searching in mind
using existingcontrols.

Thanks in advance
dec


Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Phlip | last post by:
C++ers: Here's an open ended STL question. What's the smarmiest most templated way to use <string>, <algorithms> etc. to turn this: " able search baker search charlie " into this: " able...
5
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
28
by: joshc | last post by:
If I have an array of data that I know to be sorted in increasing order, and the array is less than 50 elements, and I want to find the first element greater than a certain value, is a simple...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
0
Niheel
by: Niheel | last post by:
A few month's back I ran into this site called "Digg". Of course, by now every techie knows about it. At that time, I was just amazed by the way it worked. Right away it got me thinking, these guys...
3
by: lovecreatesbeauty | last post by:
As the most basic algorithms, search and sort my be the most essential things in many software. Does your code have them (or one of them)? What functions in UNIX 6th Edition implement search and...
1
by: Harsimrat Singh | last post by:
Hi all the Code Lovers and my developer friends out there. I have a little problem in making good search algorithms in C#. If any one could help me to make a efficient working search engine format...
19
by: Frank | last post by:
Hello, I have a byte array (byte) and want to search for 3 bytes next to each other containing 0x10, 0x12 and 0x16. Is there some method for that? Thanks Frank
47
by: Henning_Thornblad | last post by:
What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000):...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.