File: [local] / OpenXM / src / hgm / mh / src / mh-r.c (download)
Revision 1.3, Fri Mar 1 07:20:41 2013 UTC (11 years, 3 months ago) by takayama
Branch: MAIN
Changes since 1.2: +2 -2
lines
Fixed a bug on the return value.
|
/* $OpenXM: OpenXM/src/hgm/mh/src/mh-r.c,v 1.3 2013/03/01 07:20:41 takayama Exp $
R interface module
*/
#include <stdio.h>
#include "sfile.h"
#include "mh.h"
#define WSIZE 1024
int Rmh_cwishart_gen(int *mp,int *np,double *beta,double *x0p,
int *approxDegp,double *hp, int *dpp, double *xp,
int *modep,int *rankp,double *xy) {
struct cWishart *cw;
int rank;
int i;
rank = *rankp;
cw = mh_cwishart_gen(*mp,*np,beta,*x0p,*approxDegp,*hp,*dpp,*xp,*modep);
xy[0] = cw->x;
for (i=1; i<=rank; i++) xy[i] = (cw->f)[i-1];
}