00001 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef TDSPSOLVER_H 00019 #define TDSPSOLVER_H 00020 00021 #include <TQQObject.h> 00022 #include <TDSPVector.h> 00023 00028 class TDSPSolver : public TQQObject { 00029 00030 protected: 00031 00032 Bool_t fHaveSolution; 00033 00034 TDSPVector* fY; 00035 TDSPVector* fX; 00036 Int_t fNumXAlphabet; 00037 TComplex* fXAlphabet; 00038 Double_t fMinDist; 00039 00040 public: 00041 TDSPSolver(); 00042 virtual ~TDSPSolver(); 00043 00044 virtual Int_t GetNumInputs() = 0; 00045 virtual Int_t GetNumOutputs() = 0; 00046 virtual Double_t Redundancy() { return Double_t(GetNumOutputs())/Double_t(GetNumInputs());}; 00047 00048 virtual Bool_t Solve() = 0; 00049 00050 void SetY(TDSPVector*y) { fY = y;}; 00051 void SetY(TDSPVector&y) { SetY(&y);}; 00052 void SetX(TDSPVector*x) { fX = x;}; 00053 void SetX(TDSPVector&x) { SetX(&x);}; 00054 void SetXAlphabet(TDSPVector*a) { SetXAlphabet(a->GetVec(),a->GetLen());}; 00055 void SetXAlphabet(TComplex*a, Int_t l); 00056 void SetXMinDist(Double_t); 00057 00058 TDSPVector* Y() const { return fY; }; 00059 TDSPVector* GetY() const { return fY; }; 00060 TDSPVector* X() const { return fX; }; 00061 TDSPVector* GetX() const { return fX; }; 00062 00063 virtual void Print() = 0; 00064 00065 ClassDef(TDSPSolver,1) 00066 00067 }; 00068 00069 #endif
1.3.2