///////////////////////////////////////////////////////////////////// // 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, CSE791 - Design Patterns, Summer 2001 // ///////////////////////////////////////////////////////////////////// #include #include "layer.h" #include "node.h" using namespace std; void inputLayer::addNode() { inputNode node; nodes.push_back(node); } void inputLayer::useLayer() { int i; for(i=0; i