[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] God datastruktur til tab completion i C++?



On 18 Dec 2001, Erwin S. Andreasen wrote:

> Mads Bondo Dydensborg <sslug@sslug> writes:
> 
> > Jeg skal implementere/understøtte tab completion på vilkårlige strenge.
> > 
> > Jeg tænkte på om der var nogen der havde nogen erfaring med en god
> > datastruktur der meget gerne måtte være en del af STL?
> 
> Hvis du virkelig har en enorm mængde strenge som du skal lavet meget
> tab completion på, kunne du lægge dem i et 25-vejs træ hvor hver node
> indeholder eet bogstav, aka "trie":

OK, nu synes jeg måske nok det var liidt meget at gøre det sådan. Jeg
ville nok snarere have tænkt på en kombination af et binært søgetræ og en
tregrenet trie. (He, har ikke brugt ordet trie siden Dat 0 i 1994).

> STL implementering af en trie er vist sådan noget man får for som
> lektier :)

Template eller STL implementering?`Jeg kan sagtens lave en template
implementering (selvom det ikke ville give mening, da jeg kun skal bruge
det på strenge). Jeg gider bare ikke... ;-)

> 
> Men jeg kan ikke forestille mig at tab completion skulle være en
> særlig kritisk del af din applikation. Derfor burde du kunne du nøjes
> med at have dine strenge i en enhver sorteret container. Find da den
> første streng som delvist matcher din streng og fortsæt indtil du ikke
> kan finde flere matches.
> 
> I første omgang, abstrahér og optimér når du finder ud at at det er et
> problem.

Jeg er doven - gad ikke skrive det selv, hvis der var en kanonsmart
assoc. datastruktur i STL til det.

At søge igennem en container efter matches kan jeg nok godt liiige klare,
men jeg gider sgu ikke kode sådan noget - det andet burde være lige så
let, og ihvertfald sjovere ;-)

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Just because a program takes text commands makes it complex? I love GUI's. I
love using the web. I love WYSIWYG word processors. But I also love CLIs. It
feels more natural to me, as if I'm talking with the computer (granted, the
language isn't english, it's bash, and the vocabulary happens to be whatever's 
is my PATH)--I tell it what to do and it does it for me (unlike GUI's where I
have to do everything my own damn self). 
                                      - fassler, in response to MS France FUD



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *