//DataVector.h // //DataVector.h declares a container class for holding paired input // and output vectors for use in artificial neural networks. // // //Copyright 1998 Michael J. Wax //You may use this code as is, or incorporate it in another program, //as long as proper attribution is given. However, I make no warranties, //express or implied, regarding the performance of this code, its freedom from //error, or its suitability for use in a given application. //Questions or suggestions? Contact me at neural@michaelwax.com // #ifndef DATAVECTOR_H #define DATAVECTOR_H template class DataVector { public: DataVector (); ~DataVector (); //copy constructor DataVector (const DataVector &dv); //assignment operator DataVector& operator= (const DataVector &dv); //equality operator bool operator== (const DataVector &dv); //initialization function void initialize (int inputLength, int outputLength); //readers and writers int readInputVectorLength (); int readOutputVectorLength (); userType readInputVector(int index); void writeInputVector (int index, userType value); userType readOutputVector (int index); void writeOutputVector (int index, userType value); //private: userType *vinput, *voutput; int inputVectorLength, outputVectorLength; }; #endif