Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

Pattern.h

Go to the documentation of this file.
00001 #ifndef PATTERN_HEADER
00002 #define PATTERN_HEADER
00003 
00004 #include <iomanip.h>
00005 #include <vector>
00006 #include <string>
00007 
00008 #include "TObject.h"
00009 
00010 class Pattern : public TObject {
00011 
00012 protected:
00013   std::vector<Double_t> input;
00014   std::vector<Double_t> target;
00015   std::vector<Double_t> output;
00016   std::string           type;
00017 
00018 public:
00019   Pattern();
00020   ~Pattern();
00021 
00022   inline std::vector<Double_t> getInput () { return input;  }
00023   inline std::vector<Double_t> getTarget() { return target; }
00024   inline std::vector<Double_t> getOutput() { return output; }
00025   inline std::string           getType  () { return type;   }
00026 
00027   inline const std::vector<Double_t>& getInputRef () { return input;  }
00028   inline const std::vector<Double_t>& getTargetRef() { return target; }
00029   inline const std::vector<Double_t>& getOutputRef() { return output; }
00030   inline const std::string&           getTypeRef  () { return type;   }
00031 
00032   inline void   setInput (std::vector<Double_t> vector) { input  = vector; }
00033   inline void   setTarget(std::vector<Double_t> vector) { target = vector; }
00034   inline void   setOutput(std::vector<Double_t> vector) { output = vector; }
00035   inline void   setType(std::string name) { type = name; }
00036 
00037   inline UInt_t getNoOfInputs () const { return input. size(); }
00038   inline UInt_t getNoOfTargets() const { return target.size(); }
00039   inline UInt_t getNoOfOutputs() const { return output.size(); }
00040   inline UInt_t getInputSize  () const { return input. size(); }
00041   inline UInt_t getTargetSize () const { return target.size(); }
00042   inline UInt_t getOutputSize () const { return output.size(); }
00043   inline Bool_t isOutputEmpty () const { return output.empty();}
00044 
00045   Double_t getInputAt(Int_t index);
00046   Double_t getTargetAt(Int_t index);
00047   Double_t getOutputAt(Int_t index);
00048   void     setInputAt (Int_t index, Double_t value);
00049   void     setTargetAt(Int_t index, Double_t value);
00050   void     setOutputAt(Int_t index, Double_t value);
00051   void     insertInputValueAt (Int_t index, Double_t value);
00052   void     insertTargetValueAt(Int_t index, Double_t value);
00053   void     insertOutputValueAt(Int_t index, Double_t value);
00054   void     pushBackInputValue (Double_t value);
00055   void     pushBackTargetValue(Double_t value);
00056   void     pushBackOutputValue(Double_t value);
00057   void     popBackOutput();
00058   void     printPattern();
00059 
00060   ClassDef(Pattern, 1)
00061 };
00062 #endif

Generated on Wed Feb 15 17:06:36 2006 for ROOTSNNS by doxygen 1.3.6