Skip to content

Commit

Permalink
version 0.1-9
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfTurner authored and gaborcsardi committed Apr 17, 2013
1 parent a902b42 commit 37ff4cf
Show file tree
Hide file tree
Showing 21 changed files with 241 additions and 104 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Expand Up @@ -246,3 +246,11 @@ to c. 30 seconds of ellapsed time!)
Thanks to Martin Ellis for drawing the problem of slowness
of the simulation procedure to my attention, and indicating
the solution of the problem.

Version 0.1-8 --> 0.1-9
=======================

4 April 2013

Fixed up the dimensioning of Fortran arrays so that they
no longer use dummy 1's as the final dimension.
9 changes: 5 additions & 4 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: hmm.discnp
Version: 0.1-8
Date: 2012-03-02
Version: 0.1-9
Date: 2013-04-17
Title: Hidden Markov models with discrete non-parametric observation
distributions.
Author: Rolf Turner <r.turner@auckland.ac.nz> and Limin Liu.
Expand All @@ -14,6 +14,7 @@ Description: Fits hidden Markov models with discrete non-parametric
model.
License: GPL (>= 2)
URL: http://www.math.unb.ca/~rolf/
Packaged: 2012-03-02 07:14:09 UTC; rolf
Packaged: 2013-04-18 02:02:12 UTC; rolf
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2012-03-02 14:13:09
Date/Publication: 2013-04-18 07:29:04
40 changes: 20 additions & 20 deletions MD5
@@ -1,7 +1,7 @@
c58feb0f679b94b28d42f2a23f2b4c0f *ChangeLog
411eef55a024abf99e801d6548058be9 *DESCRIPTION
2221e8fd8f99f8070a0e96dfd981edb2 *ChangeLog
1099d89012367c9dc0781cfe97decb3f *DESCRIPTION
e97c7b6e0d7f0eb3b8e1303451431001 *NAMESPACE
b2d13c9ca9fcdabeeb09db8998ecdd81 *R/First.R
bb6f6344934b965a455a21347756e847 *R/First.R
184809b9344434a680bbc30dc96d3bb9 *R/RCS/First.R,v
1ea360172ada98073415122f3e5b73e4 *R/RCS/check.yval.R,v
bd6a8531b5bb39645fbdcda423465ca0 *R/RCS/ffun.R,v
Expand All @@ -28,37 +28,37 @@ eb22d9be687321b5243b12879f272cee *R/init.all.R
de0b8ed3091fa489ada6c6e5355b1856 *R/mat2list.R
b92e3051eafb9511f4cae92645158ba8 *R/mps.R
0dfefa748fd129b0dbe03289e8c45f35 *R/pr.R
2ad359d1c282e91675fb00a1bccb9b29 *R/recurse.R
b3453ba428bdb359f61e253cc01e23f2 *R/recurse.R
1386236c29748ec48a8e4cc6a41649d8 *R/revise.ispd.R
453a3658f3432a9b1b1feda4400134d7 *R/revise.rho.R
f180f9d05c14a25f746e32f579875ff1 *R/revise.tpm.R
1343dfe5864d155602c1457e62891944 *R/sim.hmm.R
4c2d789f7ee7157a3f4c66fadbe74a7a *R/sp.R
dab163b5304bd23f35e2f7f9a3ec0f3a *R/viterbi.R
2656ac33803f83f5d131053efc7c4b6b *inst/READ_ME
1cf8101749a8a99d30cd34fdc241c1d5 *inst/Ratfor/RCS/afun.r,v
64d12988d748ac0aaf6e39ff355e5e61 *inst/Ratfor/RCS/bfun.r,v
592f6e2ad146095e6523e4187414e809 *inst/Ratfor/RCS/gfun.r,v
dd41961396b612dbb4afc7fdcf73e55e *inst/Ratfor/RCS/afun.r,v
75869a842561e24d282d8ed2fc73eab8 *inst/Ratfor/RCS/bfun.r,v
f1d36db9f8e9fda32f12221e55c6dbdd *inst/Ratfor/RCS/gfun.r,v
7241424b21f65ca2f10e4dc859d31741 *inst/Ratfor/RCS/makefor,v
216262f918bfc3a9e5d2a2c9f966e93a *inst/Ratfor/RCS/recurse.r,v
d80e12de754a73bf8cc8eec9465207bb *inst/Ratfor/RCS/xfun.r,v
b7c61bd8b7581485fd3363daadc1db87 *inst/Ratfor/afun.r
db10a350fc50f2632e848bbdc72239dc *inst/Ratfor/bfun.r
55d2f08888295e7d5a4721ac02ac0777 *inst/Ratfor/gfun.r
c7a6fbf28f918754d33b796e71d553fb *inst/Ratfor/RCS/recurse.r,v
770ae0f29b53d84c091de81fae008445 *inst/Ratfor/RCS/xfun.r,v
41f0e806077d282c98851bc544b9a5ea *inst/Ratfor/afun.r
17f9bbea01421df7e8c303a1fb5cbb95 *inst/Ratfor/bfun.r
5cbc32129adddcfc60272834a794ca4a *inst/Ratfor/gfun.r
40201e8652101f856140d17279cf3f4c *inst/Ratfor/makefor
66dcf313cea6a0a481e46e7e0a65e94d *inst/Ratfor/recurse.r
61fdccfeb2762053b21b96562ca7987e *inst/Ratfor/xfun.r
d7c843cbee516d00dcc489c08cb9d069 *inst/Ratfor/recurse.r
b97264d24cd7880ce7fbad579da6953b *inst/Ratfor/xfun.r
41aaa76a3bd7b5413aac29fe8cbb6bf2 *man/fitted.hmm.discnp.Rd
9cb0f691156f3ae2dfbcdbcb2c09ff92 *man/hmm.Rd
80e4f4b78b7a476a41a9f37db05a8b65 *man/hmm.Rd
3c143ea6632f17fe683cc2114326b16b *man/hmm.discnp-internal.Rd
8361273b18a9243c78bf1b8792166a51 *man/logLikHmm.Rd
f0b59556b361b40f21fb7373256de26d *man/mps.Rd
aaaaf6989cb369e176840ad9b1d8f3f9 *man/pr.Rd
8a65682cafd13e70cedb5b9d44fe8e46 *man/sim.hmm.Rd
d477c7563a021ac09adc74dfba50a4ca *man/sp.Rd
3a961815a3f7872928c7984a76c57d00 *man/viterbi.Rd
bad8f38090026cf76ec89c84fe6fdc97 *src/afun.f
66adac3b888ebebcd71435cff3b6aff8 *src/bfun.f
3b912084f8680d2c005b1b570851a15a *src/gfun.f
b802f92e3401bcf4c27a70bb46e06847 *src/recurse.f
56390e2a9f3258e65ffb9e73178e9fb5 *src/xfun.f
f1f57c6a20eb0a28ffd79efb0f8b1816 *src/afun.f
ee174ec13251743ea33ccbc6f9009291 *src/bfun.f
25ef80dc0168437aafd15bd0fd9974d8 *src/gfun.f
36f16d5a97248e7040e2fd9c59921377 *src/recurse.f
dc1264652e18b677e558425ce8bd9aa2 *src/xfun.f
16 changes: 9 additions & 7 deletions R/First.R
@@ -1,12 +1,14 @@
.onLoad <- function(lib, pkg) {
library.dynam("hmm.discnp", pkg, lib)
}

.onAttach <- function(lib, pkg) {
ver <- read.dcf(file.path(lib, pkg, "DESCRIPTION"), "Version")
packageStartupMessage(paste(pkg, ver))
packageStartupMessage(
paste("\n PLEASE NOTE: The package has changed substantially",
"\n from the 0.0-x versions. New functions have been",
"\n added and both the argument lists and the returned",
"\n values from old functions have new forms. Please",
"\n read the ChangeLog and the documentation.\n")
)
msg <- paste("\n PLEASE NOTE: The package has changed substantially",
"\n from the 0.0-x versions. New functions have been",
"\n added and both the argument lists and the returned",
"\n values from old functions have new forms. Please",
"\n read the ChangeLog and the documentation.\n")
packageStartupMessage(msg)
}
6 changes: 5 additions & 1 deletion R/recurse.R
Expand Up @@ -10,8 +10,10 @@ K <- nrow(tpm)
K2 <- K*K
L <- ncol(fy)
M <- K*L
N <- K*M - K2
nreps <- length(lns)
nxi <- L - nreps
#N <- K*M - K2
N <- K*K*nxi
epsilon <- sqrt(.Machine$double.eps)

# Recursive probabilities:
Expand All @@ -27,6 +29,8 @@ epsilon <- sqrt(.Machine$double.eps)
nstate=as.integer(K),
wrk=double(K2),
xlc=double(L),
ntot=as.integer(L),
nxi=as.integer(nxi),
alpha=double(M),
beta=double(M),
gamma=double(M),
Expand Down
34 changes: 27 additions & 7 deletions inst/Ratfor/RCS/afun.r,v
@@ -1,11 +1,16 @@
head 1.1;
head 1.2;
access;
symbols;
locks
rturner:1.1; strict;
rolf:1.2; strict;
comment @# @;


1.2
date 2013.04.17.02.30.39; author rolf; state Exp;
branches;
next 1.1;

1.1
date 2009.09.23.03.39.00; author rturner; state Exp;
branches;
Expand All @@ -17,15 +22,15 @@ desc
@


1.1
1.2
log
@Initial revision
@Adjusted the dimensioning --- no more 1's.
@
text
@subroutine afun(fy,xispd,tpm,epsilon,n,nstate,wrk,xlc,alpha)
implicit double precision(a-h,o-z)
dimension wrk(1), xispd(1), xlc(1)
dimension fy(nstate,1), tpm(nstate,1), alpha(nstate,1)
dimension wrk(nstate), xispd(nstate), xlc(n)
dimension fy(nstate,n), tpm(nstate,nstate), alpha(nstate,n)

# Set some constants
one = 1.d0
Expand All @@ -34,7 +39,7 @@ zero = 0.d0
# Set the value to give to ``log-likelihood constant'', xlc(...)
# if this is indeterminate --- i.e. less than epsilon.
# Possible choices: -1, 1, or epsilon.
dummy = -one
dummy = epsilon

# Update the initial alpha.
tsum = zero
Expand Down Expand Up @@ -85,3 +90,18 @@ do kt = 2,n {
return
end
@


1.1
log
@Initial revision
@
text
@d3 2
a4 2
dimension wrk(1), xispd(1), xlc(1)
dimension fy(nstate,1), tpm(nstate,1), alpha(nstate,1)
d13 1
a13 1
dummy = -one
@
29 changes: 23 additions & 6 deletions inst/Ratfor/RCS/bfun.r,v
@@ -1,11 +1,16 @@
head 1.1;
head 1.2;
access;
symbols;
locks
rturner:1.1; strict;
rolf:1.2; strict;
comment @# @;


1.2
date 2013.04.17.02.31.28; author rolf; state Exp;
branches;
next 1.1;

1.1
date 2009.09.23.03.39.36; author rturner; state Exp;
branches;
Expand All @@ -17,15 +22,15 @@ desc
@


1.1
1.2
log
@Initial revision
@Adjusted the dimensioning --- no more 1's.
@
text
@subroutine bfun(fy,xispd,tpm,epsilon,n,nstate,wrk,beta)
implicit double precision(a-h,o-z)
dimension wrk(1), xispd(1)
dimension fy(nstate,1), tpm(nstate,1), beta(nstate,1)
dimension wrk(nstate), xispd(nstate)
dimension fy(nstate,n), tpm(nstate,nstate), beta(nstate,n)

# Set some constants.
one = 1.d0
Expand Down Expand Up @@ -64,3 +69,15 @@ do ktb = 2,n {
return
end
@


1.1
log
@Initial revision
@
text
@d3 2
a4 2
dimension wrk(1), xispd(1)
dimension fy(nstate,1), tpm(nstate,1), beta(nstate,1)
@
29 changes: 23 additions & 6 deletions inst/Ratfor/RCS/gfun.r,v
@@ -1,11 +1,16 @@
head 1.1;
head 1.2;
access;
symbols;
locks
rturner:1.1; strict;
rolf:1.2; strict;
comment @# @;


1.2
date 2013.04.17.02.32.02; author rolf; state Exp;
branches;
next 1.1;

1.1
date 2009.09.23.03.40.08; author rturner; state Exp;
branches;
Expand All @@ -17,15 +22,15 @@ desc
@


1.1
1.2
log
@Initial revision
@Adjusted the dimensioning --- no more 1's.
@
text
@subroutine gfun(alpha,beta,epsilon,n,nstate,wrk,gamma)
implicit double precision(a-h,o-z)
dimension alpha(nstate,1), beta(nstate,1), gamma(nstate,1)
dimension wrk(1)
dimension alpha(nstate,n), beta(nstate,n), gamma(nstate,n)
dimension wrk(nstate)

zero = 0.d0
ook = 1.d0/dble(nstate)
Expand All @@ -51,3 +56,15 @@ do kt = 1,n {
return
end
@


1.1
log
@Initial revision
@
text
@d3 2
a4 2
dimension alpha(nstate,1), beta(nstate,1), gamma(nstate,1)
dimension wrk(1)
@

0 comments on commit 37ff4cf

Please sign in to comment.