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.cpp | 4 ++++ src/column.h | 15 ++++++++++----- src/network.cpp | 1 + src/network.h | 29 +++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/column.cpp b/src/column.cpp index 10b010b..881284e 100644 --- a/src/column.cpp +++ b/src/column.cpp @@ -1 +1,5 @@ #include "neural/column.h" + +template class Neural::Column; +template class Neural::Column; +template class Neural::Column; 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; } } diff --git a/src/network.cpp b/src/network.cpp index e69de29..972c88d 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -0,0 +1 @@ +#include "neural/network.h" diff --git a/src/network.h b/src/network.h index e69de29..85d8407 100644 --- a/src/network.h +++ b/src/network.h @@ -0,0 +1,29 @@ +#ifndef NEURAL_NETWORK_H +#define NEURAL_NETWORK_H + +#include "neural/node.h" + +namespace Neural +{ + template + class Network + { + public: + Network() : + pRoot( 0 ) + { + } + + virtual ~Network() + { + delete pRoot; + } + + + + private: + Node *pRoot; + }; +}; + +#endif -- cgit v1.2.3