5 * Created by Alyssa Milburn on Mon Aug 13 2007.
6 * Copyright (c) 2007 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
24 #include <boost/shared_ptr.hpp>
28 using boost::shared_ptr
;
31 unsigned char state
, output
;
35 oldNeuron
*src
, *dest
;
36 unsigned char strength
, stw
, ltw
, suscept
;
41 class oldBrain
*parent
;
42 oldBrainLobeGene
*ourGene
;
43 std::vector
<oldNeuron
> neurons
;
44 std::vector
<oldDendrite
> dendrites
[2];
45 oldLobe
*sourceLobe
[2];
49 oldLobe(class oldBrain
*b
, oldBrainLobeGene
*g
);
50 bool wasInited() { return inited
; }
54 oldBrainLobeGene
*getGene() { return ourGene
; }
55 unsigned int getNoNeurons() { return neurons
.size(); }
56 unsigned int getNoDendrites(unsigned int t
) { return dendrites
[t
].size(); }
57 oldNeuron
*getNeuron(unsigned int i
) { return &neurons
[i
]; }
58 oldDendrite
*getDendrite(unsigned int t
, unsigned int i
) { return &dendrites
[t
][i
]; }
63 // TODO: should be oldCreature?
64 class oldCreature
*parent
;
67 std::map
<unsigned int, oldLobe
*> lobes
;
69 oldBrain(oldCreature
*p
);
73 oldLobe
*getLobeByTissue(unsigned int id
);
74 oldCreature
*getParent() { return parent
; }