///////////////////////////////////////////////////////////////////// // layer.cpp - implements collection of nodes // // - These layers are over-simplified. They are not // // interconnected to form networks and no optim- // // ization processing is implemented. // // - Their purpose is simply to show how an abstract // // factory pattern could be applied to the construct- // // tion of a neural network. // // // // Jim Fawcett, CSE776 - Design Patterns, Summer 2004 // ///////////////////////////////////////////////////////////////////// #include #include "layer.h" #include "node.h" using namespace std; void inputLayer::addNode() { inputNode node; nodes.push_back(node); } void inputLayer::useLayer() { for(unsigned int i=0; i