summaryrefslogtreecommitdiff
path: root/src/column.h
diff options
context:
space:
mode:
authormike <mike@d8baa203-390c-0410-a584-dba4c0749223>2011-07-17 21:57:41 +0000
committermike <mike@d8baa203-390c-0410-a584-dba4c0749223>2011-07-17 21:57:41 +0000
commita59a43a3b7f61dcaa4120f8283cb62aef5727b7f (patch)
treef92a7e66ec0ef990760dd917bea23ba6c32b1619 /src/column.h
parent9a8b77707c12bab9d64e92b19a8256ac5b1e252e (diff)
downloadlibneural-a59a43a3b7f61dcaa4120f8283cb62aef5727b7f.tar.gz
libneural-a59a43a3b7f61dcaa4120f8283cb62aef5727b7f.tar.bz2
libneural-a59a43a3b7f61dcaa4120f8283cb62aef5727b7f.tar.xz
libneural-a59a43a3b7f61dcaa4120f8283cb62aef5727b7f.zip
The network class will simply facilitate the input and output buffers, memory
management, and probably contain the parsing code a little later on. git-svn-id: http://svn.xagasoft.com/misc/libneural/trunk@472 d8baa203-390c-0410-a584-dba4c0749223
Diffstat (limited to 'src/column.h')
-rw-r--r--src/column.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/column.h b/src/column.h
index 17ba899..8c07f62 100644
--- a/src/column.h
+++ b/src/column.h
@@ -40,14 +40,19 @@ namespace Neural
40 40
41 virtual void process( sigtype *aInput, sigtype *aOutput ) 41 virtual void process( sigtype *aInput, sigtype *aOutput )
42 { 42 {
43 43 typename BufferList::iterator iBuf = lBuffer.begin();
44 sigtype *pInput, *pOutput; 44 sigtype *pBuffer = aInput;
45 int iOutputOffset = 0; 45 sigtype *pNextBuffer = *iBuf;
46 for( typename Container<sigtype>::NodeList::iterator i = 46 for( typename Container<sigtype>::NodeList::iterator i =
47 Container<sigtype>::getNodeList().begin(); i; i++ ) 47 Container<sigtype>::getNodeList().begin(); i; i++ )
48 { 48 {
49 (*i)->process( aInput, aOutput+iOutputOffset ); 49 (*i)->process( pBuffer, pNextBuffer );
50 iOutputOffset += (*i)->getNumOutputs(); 50 pBuffer = pNextBuffer;
51 iBuf++;
52 if( iBuf )
53 pNextBuffer = *iBuf;
54 else
55 pNextBuffer = aOutput;
51 } 56 }
52 } 57 }
53 58