#ifndef __FILE_SNPDEN_H_SEEN__
#define __FILE_SNPDEN_H_SEEN__ 

/* ----------------------------------------------------------------------------
snpden.h

Header for use with snpden which implements the Gallant-Nychka SNP
density estimator for univariate, iid data.

Reference: Gallant, A. Ronald, and Douglas W. Nychka (1987),
"Seminonparametric
Maximum Likelihood Estimation," Econometrica 55, 363-399.   

Copyright (C) 1993, 1994, 1997, 1999, 2002, 2006.

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 "libscl.h"

extern REAL     snpl(scl::realmat& X, scl::realmat& theta);
extern REAL     snplg(scl::realmat& X, scl::realmat& theta, 
                         scl::realmat& gradient);
extern REAL     snplgh(scl::realmat& X, scl::realmat& theta,
                         scl::realmat& gradient, scl::realmat& hessian);
extern REAL     snplgi(scl::realmat& X, scl::realmat& theta,
                         scl::realmat& gradient, scl::realmat& info);
extern REAL     snplgirmt(scl::realmat& X, scl::realmat& theta,
                         REAL l, scl::realmat& gradient, scl::realmat& 
			 info, INTEGER t);

extern REAL     snpl(scl::realmat& X, scl::realmat& theta, REAL e0);
extern REAL     snplg(scl::realmat& X, scl::realmat& theta, REAL e0, 
                         scl::realmat& gradient);
extern REAL     snplgh(scl::realmat& X, scl::realmat& theta, REAL e0, 
                         scl::realmat& gradient, scl::realmat& hessian);
extern REAL     snplgi(scl::realmat& X, scl::realmat& theta, REAL e0,
                         scl::realmat& gradient, scl::realmat& info);
extern REAL     snplgirmt(scl::realmat& X, scl::realmat& theta, REAL e0,
                         REAL l, scl::realmat& gradient, scl::realmat& 
			 info, INTEGER t);


extern REAL     snpscore(REAL x, scl::realmat& theta, REAL xmean, 
                         REAL xsigma, scl::realmat& score);

#endif
