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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: "accessibility check failed" on Node Date: Thu, 27 Jun 2013 09:49:54 +0200 Organization: cbb software GmbH Message-ID: <5m42cze63eb5.zbsqkhivilnh.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: IenaDxMXK2hi7fvYcb+MlQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:15950 Date: 2013-06-27T09:49:54+02:00 List-Id: On Thu, 27 Jun 2013 01:01:19 +0200, Thomas Schmidt wrote: > I'm new to Ada. I'm trying to write some kind of neural net software. > Therefore I've written a small library to implement the neural graph. > All nodes are collected in a Hashed_Set. Neurons are specialized Nodes > of the graph. I don't think that is a good approach. I have a comparable project which deployed fuzzy decision trees. DT's are not really trees but rather directed graphs. The properties of such graphs are much alike to ones of NN's. E.g. layers, waterfall navigation upon classification etc. Building a hash function for nodes of such a graph is a problem. Especially if you want to factor out repeating subgraphs, which I did because I had a huge number of nodes. If the hash function takes into account the edges and weights, and it should, any modification of the graph will kill it. As others have pointed out, do not use anonymous access types. On top of that. You should carefully design the strategy of memory collection. It will have a great impact on how easy or difficult would be to implement graph management operations, especially in a concurrent environment when many tasks access the graph, e.g. one does training, another pulls the MVC's model of the GUI, third does storing it into the persistent storage. For my project I used reference counting with weak and strong references and cloning shared nodes upon update. P.S. I am afraid one cannot do it in a simple way without much upfront design, and then gradually evolve it to deal with complicated issues like above. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de