From a59a43a3b7f61dcaa4120f8283cb62aef5727b7f Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 17 Jul 2011 21:57:41 +0000 Subject: 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 --- src/column.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/column.h') 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 virtual void process( sigtype *aInput, sigtype *aOutput ) { - - sigtype *pInput, *pOutput; - int iOutputOffset = 0; + typename BufferList::iterator iBuf = lBuffer.begin(); + sigtype *pBuffer = aInput; + sigtype *pNextBuffer = *iBuf; for( typename Container::NodeList::iterator i = Container::getNodeList().begin(); i; i++ ) { - (*i)->process( aInput, aOutput+iOutputOffset ); - iOutputOffset += (*i)->getNumOutputs(); + (*i)->process( pBuffer, pNextBuffer ); + pBuffer = pNextBuffer; + iBuf++; + if( iBuf ) + pNextBuffer = *iBuf; + else + pNextBuffer = aOutput; } } -- cgit v1.2.3