// file: $isip/class/stat/StatisticalModel/StatisticalModelUndefined.h
// version: $Id: StatisticalModelUndefined.h 8756 2002-10-18 21:47:07Z alphonso $
//

// make sure definitions are only made once
//
#ifndef ISIP_STATISTICAL_MODEL_UNDEFINED
#define ISIP_STATISTICAL_MODEL_UNDEFINED

#ifndef ISIP_STATISTICAL_MODEL_BASE
#include <StatisticalModelBase.h>
#endif

// StatisticalModelUndefined: default model type that insures the user sets
// the type in StatisticalModel to a valid type before computing. all methods
// error
//
class StatisticalModelUndefined : public StatisticalModelBase {

  //---------------------------------------------------------------------------
  //
  // public constants
  //
  //---------------------------------------------------------------------------
public:

  // define the class name
  //
  static const String CLASS_NAME;

  //----------------------------------------
  //
  // default values and arguments
  //
  //----------------------------------------  

  // define the default value(s) of the class data
  //
  
  //----------------------------------------
  //
  // error codes
  //
  //----------------------------------------  

  //---------------------------------------------------------------------------
  //
  // protected data
  //
  //---------------------------------------------------------------------------
protected:

  //---------------------------------------------------------------------------
  //
  // required public methods
  //
  //---------------------------------------------------------------------------
public:

  // method: name
  //
  static const String& name() {
    return CLASS_NAME;
  }
  
  // method: diagnose
  //
  static boolean diagnose(const unichar* msg) {
    return Error::handle(name(), L"diagnose", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: debug
  //
   boolean debug(const unichar* msg) const {
    return Error::handle(name(), L"debug", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: destructor
  //
  ~StatisticalModelUndefined() { }

  // method: default constructor
  //
  StatisticalModelUndefined() { }

  // method: copy constructor
  //
  StatisticalModelUndefined(const StatisticalModelUndefined& arg) {
    assign(arg);
  }

  // method: assign
  //
  boolean assign(const StatisticalModelUndefined& arg) {
    return Error::handle(name(), L"assign", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: eq
  //
  boolean eq(const StatisticalModelUndefined& arg) const {
    return Error::handle(CLASS_NAME, L"eq", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: sofSize
  //
  long sofSize() const {
    return Error::handle(name(), L"sofSize", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: sofAccumulatorSize
  //
  long sofAccumulatorSize() const {
    return Error::handle(name(), L"sofAccumulatorSize", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: sofOccupanciesSize
  //
  long sofOccupanciesSize() const {
    return Error::handle(name(), L"sofOccupanciesSize", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }  

  // method: read
  //
  boolean read(Sof& sof, long tag, const String& name) {
    return Error::handle(CLASS_NAME, L"read", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: write
  //
  boolean write(Sof& sof, long tag, const String& name) const {
     return Error::handle(CLASS_NAME, L"write", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: readData
  //
  boolean readData(Sof& sof, const String& pname,
		   long size, boolean param, boolean nested) {
    return Error::handle(CLASS_NAME, L"readData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: writeData
  //
  boolean writeData(Sof& sof, const String& pname) const {
    return Error::handle(CLASS_NAME, L"writeData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: readAccumulator
  //
  boolean readAccumulator(Sof& sof, long tag, const String& name) {
    return Error::handle(CLASS_NAME, L"readAccumulator", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: writeAccumulator
  //
  boolean writeAccumulator(Sof& sof, long tag, const String& name) const {
    return Error::handle(CLASS_NAME, L"writeAccumulator", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: readAccumulatorData
  //
  boolean readAccumulatorData(Sof& sof, const String& pname,
		   long size, boolean param, boolean nested) {
    return Error::handle(CLASS_NAME, L"readData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: writeAccumulatorData
  //
  boolean writeAccumulatorData(Sof& sof, const String& pname) const {
    return Error::handle(CLASS_NAME, L"writeData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
    
  // method: readOccupancies
  //
  boolean readOccupancies(Sof& sof, long tag, const String& name) {
    return Error::handle(CLASS_NAME, L"readAccumulator", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: writeOccupancies
  //
  boolean writeOccupancies(Sof& sof, long tag, const String& name) const {
    return Error::handle(CLASS_NAME, L"writeAccumulator", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: readOccupanciesData
  //
  boolean readOccupanciesData(Sof& sof, const String& pname,
			      long size, boolean param, boolean nested) {
    return Error::handle(CLASS_NAME, L"readData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: writeOccupanciesData
  //
  boolean writeOccupanciesData(Sof& sof, const String& pname) const {
    return Error::handle(CLASS_NAME, L"writeData", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }
  
  // method: operator new
  //
  static void* operator new(size_t size) {
    Error::handle(CLASS_NAME, L"new", Error::VIRTUAL_PTR,
		  __FILE__, __LINE__);
    return (void*)NULL;
  }

  // method: operator new[]
  //
  static void* operator new[](size_t size) {
    Error::handle(CLASS_NAME, L"new[]", Error::VIRTUAL_PTR,
		  __FILE__, __LINE__);
    return (void*)NULL;
  }

  // method: operator delete
  //
  static void operator delete(void* ptr) {
    Error::handle(CLASS_NAME, L"delete", Error::VIRTUAL_PTR,
		  __FILE__, __LINE__);
  }

  // method: operator delete[]
  //
  static void operator delete[](void* ptr) {
    Error::handle(CLASS_NAME, L"delete[]", Error::VIRTUAL_PTR,
		  __FILE__, __LINE__);
  }

  // method: setGrowSize
  //
  static boolean setGrowSize(long size) {
    return Error::handle(CLASS_NAME, L"setGrowSize", Error::VIRTUAL_PTR,
		  __FILE__, __LINE__);
  }

  // method: clear
  //   return true instead of an error as this method is
  //   required by higher-level classes
  //
  boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE) {
    return true;
  }

  //---------------------------------------------------------------------------
  //
  // class-specific public methods
  //
  //---------------------------------------------------------------------------

  // method: eq
  //
  boolean eq(const StatisticalModelBase& arg) const {
    return Error::handle(CLASS_NAME, L"eq", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: assign
  //
  boolean assign(const StatisticalModelBase& arg) {
    return Error::handle(CLASS_NAME, L"assign", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: setMode
  //
  boolean setMode(MODE mode) {
    mode_d = mode;
    return true;
  }
  
  // method: className
  //
  const String& className() const {
    return CLASS_NAME;
  }

  // method: init
  //
  boolean init() {
    return false;
  }

  // method: getMean
  //
  boolean getMean(VectorFloat& mean) {
    return Error::handle(CLASS_NAME, L"getMean", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: getCovariance
  //
  boolean getCovariance(MatrixFloat& cov) {
    return Error::handle(CLASS_NAME, L"getCovariance", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: getLikelihood
  //
  float getLikelihood(const VectorFloat& input) {
    return Error::handle(CLASS_NAME, L"getLikelihood", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: getLogLikelihood
  //
  float getLogLikelihood(const VectorFloat& input) {
    return Error::handle(CLASS_NAME, L"getLogLikelihood", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: resetAccumulators
  //
  boolean resetAccumulators() {
    return Error::handle(name(), L"resetAccumulators", Error::ARG, __FILE__, __LINE__);
  }
  
  // method: getOccupancy
  //
  double getOccupancy() {
    return Error::handle(name(), L"getOccupancy", Error::ARG, __FILE__, __LINE__);
  }

  // method: setOccupancy
  //
  boolean setOccupancy(double arg) {
    Error::handle(name(), L"getOccupancy", Error::ARG, __FILE__, __LINE__);
    return false;
  }  

  // method: getAccessCount
  //
  long getAccessCount() {
    return Error::handle(name(), L"getAccessCount", Error::ARG, __FILE__, __LINE__);
  }

  // method: setAccessCount
  //
  boolean setAccessCount(long arg) {
    return Error::handle(name(), L"setAccessCount", Error::ARG, __FILE__, __LINE__);
  }

  // method: initialize
  //
  boolean initialize(VectorFloat& param) {
    return Error::handle(name(), L"initialize", Error::ARG, __FILE__, __LINE__);
  }
  
  // method: accumulate
  //
  boolean accumulate(VectorFloat& data) {
    return Error::handle(name(), L"initialize", Error::ARG, __FILE__, __LINE__);
  }

  // method: accumulate
  //
  boolean accumulate(VectorDouble& param,
		     VectorFloat& data, boolean precomp) {
    return Error::handle(CLASS_NAME, L"accumulate", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  // method: update
  //  
  boolean update(VectorFloat& varfloor, long min_count) {
    return Error::handle(CLASS_NAME, L"update", Error::VIRTUAL_PTR,
			 __FILE__, __LINE__);
  }

  //---------------------------------------------------------------------------
  //
  // private methods
  //
  //---------------------------------------------------------------------------
private:

};

// end of include file
// 
#endif
