#ifndef __FILE_EMMUSR_H_SEEN__

/*-----------------------------------------------------------------------------

Copyright (C) 2005.

A. Ronald Gallant
Post Office Box 659
Chapel Hill NC 27514-0659
USA   

Permission to use, copy, modify, and distribute this software and its docu-
mentation for any purpose and without fee is hereby granted, provided that 
the above copyright notice appears in all copies and that both that copyright 
notice and this permission notice appear in supporting documentation.  This 
software is provided "as is" without any expressed or implied warranty.

-----------------------------------------------------------------------------*/

#include "libsnp.h"
#include "libsmm.h"
#include "emm_base.h"
#include "snp.h"

namespace emm {
    
  class generic_usrmod;

  typedef generic_usrmod usrmod_type;

  class generic_usrmod : public libsmm::usrmod_base {
  private:
    scl::realmat data;
    scl::realmat rho;
    INTEGER lrho;
    INTEGER lstats;
  public:
    generic_usrmod
      (const scl::realmat& dat, INTEGER len_mod_parm, INTEGER len_mod_func,
       const std::vector<std::string>& mod_pfvec,
       const std::vector<std::string>& mod_alvec, 
       std::ostream& detail);
    INTEGER len_rho() {return lrho;}
    INTEGER len_stats() {return lstats;}
    bool gen_sim(scl::realmat& sim, scl::realmat& st) 
      {st.resize(1,1,0.0); return true;}
    void get_rho(scl::realmat& parm) { parm = rho; }
    void set_rho(const scl::realmat& parm) {rho = parm;}
    void set_data(const scl::realmat& dat) { data = dat; }
    bool support(const scl::realmat& rho);
    scl::den_val prior(const scl::realmat& rho, const scl::realmat& stats);
    scl::den_val likelihood(scl::realmat& yhat, scl::realmat& zhat);
  };
  
}
#define __FILE_EMMUSR_H_SEEN__
#endif
