From 673252f7eadc3aa0cfae3d826e1c7bbe2400df17 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 9 Jul 2012 13:57:37 -0600 Subject: It generates pngs just like the java version. Maybe even prettier. --- src/container.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/container.h') diff --git a/src/container.h b/src/container.h index d9eeffd..f341bf8 100644 --- a/src/container.h +++ b/src/container.h @@ -22,6 +22,30 @@ namespace Neural delete *i; } + virtual int setWeights( const sigtype *pWeights ) + { + int iOffset = 0; + for( typename Container::NodeList::iterator i = + Container::getNodeList().begin(); i; i++ ) + { + iOffset += (*i)->setWeights( &pWeights[iOffset] ); + } + + return iOffset; + } + + virtual int setBiases( const sigtype *pBiases ) + { + int iOffset = 0; + for( typename Container::NodeList::iterator i = + Container::getNodeList().begin(); i; i++ ) + { + iOffset += (*i)->setBiases( &pBiases[iOffset] ); + } + + return iOffset; + } + virtual void addNode( Node *pNode ) { lNodes.append( pNode ); -- cgit v1.2.3