/////////////////////////////////////////////////////////////// // concFact.cpp -- creates layers of each type, e.g., // // input, hidden, and output // // // // This example is oversimplified in the following ways: // // - a real network needs its layers wired together. // // That has not been done here. // // - a real network may have different node types in // // each layer, again, not done here. // // // // Jim Fawcett, CSE776 - Design Patterns, Summer 2004 // /////////////////////////////////////////////////////////////// #include #include "concFact.h" #include "layer.h" #include "node.h" using namespace std; abstractLayer* inputLayerFact::createLayer() { pLayer = new inputLayer(); return pLayer; } void inputLayerFact::PopulateLayer(int n) { int i; for(i=0; iaddNode(); } abstractLayer* hiddenLayerFact::createLayer() { pLayer = new hiddenLayer(); return pLayer; } void hiddenLayerFact::PopulateLayer(int n) { int i; for(i=0; iaddNode(); } abstractLayer* outputLayerFact::createLayer() { pLayer = new outputLayer(); return pLayer; } void outputLayerFact::PopulateLayer(int n) { int i; for(i=0; iaddNode(); }