Re: search algorithm
- From: fenwayfool <peterson.russell@xxxxxxxxx>
- Date: Tue, 6 Jan 2009 17:00:44 -0800 (PST)
On Jan 6, 7:56 pm, p...@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
wrote:
fenwayfool <peterson.russ...@xxxxxxxxx> writes:
On Jan 6, 7:02 pm, Patricia Shanahan <p...@xxxxxxx> wrote:
fenwayfool wrote:
Anyone ever do something similar to the following (in C++ or some
other language)...
I need to create a database that has a fairly long key. Consider the
key a bitstring. My problem is that this key also has an associated
mask. All bits that we "care" about in the key have a mask value of
'1' while the don't care bits are marked with a zero.
Basically I want to simulate the operation of a ternary CAM in
software in a semi efficient manner. I have a few other databases I
use a hash_map<> for which works just fine... but the introduction of
a "don't care" mask eliminates this as a possibility.
Is the mask fixed for a given item in the database, or subject to change
from search to search?
Patricia
The mask is fixed for any given database entry... but each entry may
have a different mask.
And what about the queries?
--
__Pascal Bourguignon__- Hide quoted text -
- Show quoted text -
The queries are simply a byte stream. That is a query does NOT
specify a mask. I was thinking in some ways it is the opposite of a
dictionary database (full of text words) where you can do a partial
match search (using a regular expression as the query key).
.
- Follow-Ups:
- Re: search algorithm
- From: Pascal J. Bourguignon
- Re: search algorithm
- References:
- search algorithm
- From: fenwayfool
- Re: search algorithm
- From: Patricia Shanahan
- Re: search algorithm
- From: fenwayfool
- Re: search algorithm
- From: Pascal J. Bourguignon
- search algorithm
- Prev by Date: Re: search algorithm
- Next by Date: Re: search algorithm
- Previous by thread: Re: search algorithm
- Next by thread: Re: search algorithm
- Index(es):
Relevant Pages
|