[opdev] feature-id and

0 views
Skip to first unread message

Pierre Lindenbaum

unread,
Sep 25, 2008, 10:19:29 AM9/25/08
to fog...@cng.fr, he...@cng.fr, opero...@googlegroups.com
Mario,

(thank you for your previous mail)

I'm still looking at how you're packing your data into an 'fid'.
I do understand that your data (species, organel... etc...) are stored
in a string that allow the records to be sorted and then quickly
searched (just like a binary_search)

Instead of storing this stuff in a string why not storing this key in
a structure:

struct fid
{
//union or whatever if this struct is polymorphic
enum Species organism;
enum Organelle where;
etc...
}


*AND* then assigning a specific *comparator* for each database (
http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_set_bt_compare.htm
) ?

Pierre

Pierre Lindenbaum

unread,
Sep 25, 2008, 11:33:08 AM9/25/08
to fog...@cng.fr, he...@cng.fr, opero...@googlegroups.com
> Is it really necessary to do this major change for what it is
> working already pretty well ?

you're the boss :-)

> The fid as it is, an ID, it is
> sorted naturally by the Berkeley api, and I am not sure how
> efficient db_set_bt_compare will be at insertion time.

ok

> Why do
> you need the structure when you have the attributes on the
> data side ?

because I like structured data ! :-)

and I would find it simpler to access the elements of the fid
if(fid.organism==HomoSpiens)....

Pierre

Reply all
Reply to author
Forward
0 new messages