From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.97.33 with SMTP id dx1mr27971727pab.9.1446603367460; Tue, 03 Nov 2015 18:16:07 -0800 (PST) X-Received: by 10.182.24.226 with SMTP id x2mr326068obf.8.1446603367425; Tue, 03 Nov 2015 18:16:07 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!i2no3776034igv.0!news-out.google.com!z4ni45640ign.0!nntp.google.com!i2no2707335igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Nov 2015 18:16:07 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=72.86.45.219; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 72.86.45.219 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <59c99dce-9cc6-4aba-9c5e-a5dd22ef7fea@googlegroups.com> Subject: Questions concerning "Simple Components" From: Jeremiah Injection-Date: Wed, 04 Nov 2015 02:16:07 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28205 Date: 2015-11-03T18:16:07-08:00 List-Id: I really like a lot of the items found in the Simple Components library, bu= t had a few questions on their usage. Specifically: Generic_B_Trees have a generic package parameter "Width" which has the foll= owing description from the website: "Width is the size of the bucket of key-value pairs allocated per tree node= ;" This doesn't make a lot of sense to me. I'm sure I am just missing somethi= ng simple, but what is the "bucket" being referenced? Is it terminology fo= r how many key value pairs can be created before more memory has to be allo= cated? The "per tree node" part also throws me off a little bit because on= a binary tree, I would expect only one key/value pair per node. That said= , I could be misunderstanding some of the terminology. Can anyone add some= clarity to what exactly the Width parameter does? 2nd question: I really like the concept of Generic_External_B_Tree which use persistent s= torage to save data. One thing I am trying to get a better handle on is a = better way to handle the Root node address returned from Get_Root_Address. = I need this value to create the tree in a later application invocation. I= know I could just save it in another file or possibly add a root address v= alue to all my tree nodes, but both of those methods seem wasteful. What m= ethods do yall use to store the root node address? I thought about just wr= iting it to the beginning of the Persistent_Array, but I don't know how wel= l mixing types (a raw Byte_Index and a Generic_External_B_Tree) in a single= Persistent_Array will work. I'm still digging through the code to see if = I could do this in some manner, but if any of yall have suggestions on how = to better manage the root node address, I would appreciate it. Simple Components reference: http://www.dmitry-kazakov.de/ada/components.htm#b-tree