                        CHANGES IN VERSION 0.5 (March 2016)

USER LEVEL CHANGES

-- API changes for MCMCspec objects: new method printSamplers() prints the current samplers (replacing the old getSamplers() method); new functionality for getSamplers(), which now returns a list of samplerSpec objects; new overloaded functionality of setSamplers(), which can accept a list of samplerSpec objects, replacing the current set of samplers; new method getSamplerDefinition(), which returns the nimbleFunction definition of a sampler.

-- API created for modifying samplerSpec objects: setName(), setSamplerFunction(), setTarget(), setControl().

-- MCMC conjugate sampling efficiency improved by ~33%

-- new system for automating the comparison of different MCMCs and generating html results pages: the main function is compareMCMCs.

-- enhanced checking of model to check for size and dimension mismatch in BUGS code

-- some steps of building models and determining dependencies (e.g. getDependencies method for model classes) are faster and use less memory

-- models have a new method, getDependenciesList, that provides a list of neighbor relationships in the model graph.

-- There is a new function, getParam(model, node, parameter), that returns the value of a parameter of a stochastic node.  It works in R and in the NIMBLE DSL (compilable run code).

-- Models now have member functions for calculate, simulate, getLogProb, calculateDiff, and getParam.  model$calculate(nodes) is equivalent to calculate(model, nodes), etc.

-- The NIMBLE DSL now allows drop=FALSE as the last argument for indices.  e.g. x[1,,drop=FALSE].  This mimics R.

-- There are more flexible ways to provide arguments to declare and setSize.

-- The random walk block sampler is a bit more efficient.

-- There is better error trapping during some compilation steps.

DEVELOPER LEVEL CHANGES

-- various modifications to conform to CRAN rules 

BUG FIXES

-- Compilation of BUGS function inprod is fixed

-- some cases of handling multivariate variables of length one (e.g. a 1x1 matrix) have been fixed.

-- added warning when 'size' in multinomial is not sum of values

-- added missing terms (involving only the data values) in 'ddirchmulti' in test-user.R and in manual

                        CHANGES IN VERSION 0.4-1 (Oct. 3, 2015)

USER LEVEL CHANGES

-- added support for OpenBUGS to MCMCsuite.

-- added additional option for MCMCsuite: 'calculateEfficiency' to calculate ESS and ESS/time.

-- added elliptical slice sampler 'ess' to MCMC engine.

-- added new MCMC option for MCMCsuite that omits conjugate samplers: 'nimble_noConj'

BUG FIXES

-- fixed bug preventing use of nimbleFunctions in packages depending on NIMBLE.

-- fixed bug preventing use of nimStop in R version of nimbleFunctions.

-- reduced generation of C++ compiler warnings on Windows during compileNimble.

                        CHANGES IN VERSION 0.4 (Aug. 2, 2015)

USER LEVEL CHANGES

-- almost everything is faster in almost all cases (building models, configuring MCMCs, compiling models and nimbleFunctions), sometimes very much faster, especially during R processing.

-- added DSL functions stop("Error message") and checkInterrupt() to check for a user interrupt (via R_checkUserInterrupt() in C++).

-- added support for scalar and vector character strings in the compiler.  The ony meaningful use currently is as argument(s) to print or stop.

-- added calculateDiff as a fourth fundamental method (after calculate, simulate, getLogProb) in model node functions.

-- nearly all calls to DSL functions or other nimbleFunctions handle R-style named or ordered arguments.

-- dots (".") are allowed in nimbleFunction argument names.

-- most Windows compiler warnings about comparing unsigned and signed ints should be gone.  Harmless warnings remain and some objects possibly being used before initialization.

-- more informative error messages added in many cases.

-- nimble version of some common R functions is now consistently prefixed with "nim" instead of "nimble".  E.g. nimRound, nimStop, nimPrint, nimCopy.  These can still used without the prefix in the DSL, e.g. round, stop, print, copy.

-- added nimbleOptions useMultiInterfaceForNestedNimbleFunctions (default TRUE) and (experimental) clearNimbleFunctionsAfterCompiling (default FALSE) to reduce memory use. See User Manual section 9.6.

-- setSize now consistently works in both compiled and uncompiled uses as setSize(X, size1, size2, etc.), not setSize(X, c(size1, size2, etc.)).

-- added support for user-defined functions in BUGS code.

-- added support for use of user-defined distributions in BUGS code, with the distribution density, simulate, distribution and quantile functions coded as nimbleFunctions and registered via registerDistributions().

-- added support for truncation (T(,) and I(,) syntax in BUGS) plus dinterval distribution for censoring, both following the JAGS functionality.

-- added ability to impose constraints via the dconstraint syntax; these constraints act like data and therefore only take effect a posteriori and are not imposed when simulating from the model.

-- added alternative distribution names (aliases) usable in BUGS code (via an extensible system for adding additional aliases as desired): dbinom for dbin, dmultinom for dmulti, dnbinom for dnegbin, dchisqr for dchisq, dweibull for dweib, ddirich for ddirch, dwishart for dwish.

-- added additional parameterizations for dlnorm and dt.

-- improved handling of distribution functions in nimbleFunction run code (i.e., the DSL), allowing argument matching by name and use of default values. Distribution functions can also be used as deterministic functions (e.g., pnorm to do probit calculations) in BUGS code. 

-- added an optional check when building model that alerts user to presence of nodes without values and log probability calculations that return NA.

-- model$checkConjugacy(nodes) now accepts a character vector argument of node/variable names, and returns a named list identifying conjugate relationships.

-- incorporated automated blocking into MCMC engine: configureMCMC(model, autoBLock=TRUE) returns an MCMCspec defined by automated blocking procedure, and buildMCMC(model, autoBlock=TRUE) returns the corresponding MCMC algorithm.

-- new syntax for MCMCspec$addSampler(type, target, control).  mandatory 'type' argument specifies sampler type, which may be a character string or nimbleFunction object.  mandatory 'target' argument specifices a character vector of target model nodes.  optional 'control' list argument overrides default sampler control parameters.

-- default control parameters for MCMC sampling algorithms are now a NIMBLE system level option: MCMCcontrolDefaultList.

-- MCMCspec$getSamplers(ind), MCMCspec$setSamplers(ind), and MCMCspec$removeSamplers(ind) can optionally also accept a character vector argument, and will act on all samplers which sample the nodes specified.

-- cleaned up formatting of output when querying and setting MCMC samplers.

-- NIMBLE will no longer "hang" when used in RStudio.

-- reordered argument names to nimbleModel to put in more logical order of importance. first four arguments are: code, constants, data, inits.

-- added documentation of NIMBLE's built-in MCMC samplers via help(samplers).

-- added more informative error messages for common errors encountered when calling nimbleModel() and compileNimble().


DEVELOPER LEVEL CHANGES

-- re-wrote model definition processing and R nodeFunction instantiation to do more work at the level of a BUGS declaration rather than for each individual node.

-- re-wrote checkConjugacy to use the new model definition content.

-- re-wrote C++ nimCopy system and corresponding R partial evaluation to do more processing in R and set up C++ for faster processing.

-- added test-copy for nimCopy, values() and values()<- .

-- added nimbleProjectClass method for adding groups of nimbleFunctions from same generator at once.

-- modified core samplers like RW to use the new calculateDiff nodeFunction method.

-- added CmultiNimbleFunctionInterface to interface compiled nimbleFunctions contained within other nimbleFunctions.

-- removed some old code deemed to be fully defunct.

-- added 'range' variable to all distributions; when truncation is specified this modifies the range and also sets the 'truncated' flag to TRUE; range is not at the moment used but could be used by developers in algorithms.

-- added a variety of error checking for various distribution functions and now generally use doubles in distribution functions in C++.

-- modified API for nimble options to mimic R's options(), including nimbleOptions() and getOptions() and renaming of the underlying nimble options object to be .nimbleOptions.

-- added an environment, nimbleUserNamespace, in the package namespace, that allows user-supplied information to control the behavior of NIMBLE. At the moment, only used for user-supplied distributions list.

-- testing of user-defined distributions and functions in BUGS code (tests/test-user.R).

-- full suite of testing for truncation/censoring/constraints added (tests/test-trunc.R).

-- names of custom MCMC sampler nimbleFunctions need not begin with "sampler_".

-- added initializeModel() nimbleFunction for use in algorithms; it performs sensible model initialization at the onset of an algorithm.

BUG FIXES

-- setSize fixed.

-- generation of "1/(scale)" type bits in keyword processing for exp and gamma fixed.

-- fixed bug where quitting R after dyn.unload()ing in OS X / Linux caused a segfault.  Now we rely on a finalizer that uses the base class virtual destructor, which is in the package dll, not the generated one(s).  We still have segfaults on Windows after dyn.unload()ing.

-- made row subset assignment work in the compiler, e.g. x[i,] <- foo(a).

-- updated package to use new igraph 1.x.x API and now explicitly link in LAPACK_LIBS and BLAS_LIBS when building libnimble.so as dpotrf not being found when using igraph 1.x.x.

-- fixed bug where dexp was passing the wrong parameter (rate instead of scale) to C++; we now use our own dexp_nimble, which calls Rmath's dexp correctly.

-- set default for deparse to width.cutoff=500L to avoid splitting of lines when going from expressions to string names.

                        CHANGES IN VERSION 0.3-1 (Mar. 7, 2015)

USER LEVEL CHANGES

-- fully allow data to be provided as part of constants argument in nimbleModel for compatibility with JAGS and BUGS, which mix data and constants

-- added Dirichlet-multinomial conjugacy handling

-- Added 'oldSpec' argument to configureMCMC. Allows rebuilding of MCMCs without the need to recompile code if there are no new types of samplers.

-- Now allow for up to 4D arrays

-- Added handling of raising a vector of values to a scalar power in nimble functions (i.e., the NIMBLE DSL)

DEVELOPER LEVEL CHANGES

-- fixed naming issue in checking posterior summaries against known values in test_mcmc 

BUG FIXES 

-- fixed bug that allowed inits to overwrite data values in variables that are mixtures of data and parameters. Also now detect elements of initial values that are not variables in the model.

-- fixed bug in naming of nodes in as.matrix() when there is a variable with a single indexed node (e.g. x[1], but no other nodes in the variable 'x')

-- fixed bug regarding logProbs with gaps (e.g., if logProb_x[1] and logProb_x[3] are defined but not logProb_x[2])

-- fixed bug in handling of unary minus for non-scalars

		  	CHANGES IN VERSION 0.3 (Dec. 31, 2014)

USER LEVEL CHANGES

-- IMPORTANT SYNTAX CHANGE: nimbleFunctions are run via myNimbleFunction$run() instead of myNimbleFunction(). This means code written in v0.2 and earlier will not run without adding $run. 

-- IMPORTANT SYNTAX CHANGES: 
  --- writing code for nimble models is now done with nimbleCode (previously modelCode)
  --- to customize MCMC use myMCMCspec <- configureMCMC(myModel) (previously MCMCspec)
  --- to build an MCMC algorithm, either myGenericMCMC <- buildMCMC(myModel) for a generic build or myCustomizedMCMC <- buildMCMC(myMCMCspec) for a customized MCMC algorithm can be used (previously one always had to build an MCMCspec, even for generic build)

-- Variables and methods of a nimbleFunction can be accessed by myNimbleFunction$myVariable or myNimbleFunction$myMethod() rather than nfVar(myNimbleFunction, ‘myVariable’) or nfMethod(myNimbleFunction, ‘myMethod’)(). Similarly, names of objects/methods of a nimble function can be queried by ls(myNimbleFunction)

-- faster compiling, most notably when compiling MCMC algorithms
 
DEVELOPER LEVEL CHANGES

-- Addition of graphIDs for logProbs for models (separate set than graphIDs for nodes) and graphIDs for modelValue variables

-- Addition of $expandNodeNames() for modelValues

-- $expandNodeNames() now evals nodeNames text array to quickly retrieve graphIDs.  expandNodeNames can also accept graphIDs and return names. Also can return multivariate nodes as either ‘x[1:10]’ or ‘x[1]’,’x[2]’, etc.

-- Addition of numberedObjects (both at R and C++ level) currently used for fast construction of C++ nodeFunctionVectors, modelVariableAccessors and modelValuesAccessors

-- Reduction of nimbleFunctions required for initialization functions of MCMCs

-- nimCopy now only requires that the number of nodes are equal, not that the sets of consecutive nodes be equal (i.e. previous nimCopy(…, nodes = c(‘x[1]’, ‘x[2]’), nodesTo = c(‘y[1,1]’, ‘y[2,2]’)) was not allowed). 

-- Addition of keywordProcessing system for more organized compiling of nimbleFunctions

Bug fixes

-- Fixed bug regarding calculating log probabilities for multinomial distribution with probabilities equal to 0


                     CHANGES IN VERSION 0.2 (Oct. 12, 2014)

-- Internal changes to decrease time to build models and nimbleFunctions.

-- Multivariate conjugate updaters are now included in the default MCMC implementation, as well as block updating on scalar and/or multivariate nodes.

-- Vector treatment of is.na and is.nan, so is.na(values(model, nodes)) will work, equivalently to any(is.na(...)) in R.

-- More extensive suite of tests.

-- Extension of node maps, which can be accessed via graphIDs, to increase speed of determining node types, checking if nodes in model, etc. 

-- model$getNodeNames, expandNodeNames and getDependencies all return the full node function name, i.e. if 'x[1:2]' is multivariate, will return 'x[1:2]' rather than 'x[1]', 'x[2]', unless returnScalarComponents = TRUE

-- Added class of nodeVectors, which save the graphIDs of a set of nodes. Use of these is minimal at the moment. 

BUG FIXES

-- Fixed issue with specifying multivariate nodes as rows/columns of matrices

-- Fixed bug in the conjugacy system

-- Fixed bug in compiled version of adaptive block updater

-- Fixed issue with building the NIMBLE package for Windows, as well as cleaning up causes of compiler warnings.

-- Fixed issue that values(model, nodes) sorted the outcome. Remaining bug to be fixed: nimCopy(nodesFrom, nodesTo) will NOT work if nodesFrom and nodesTo have different number/different lengths of ordered contingent blocks of memory, i.e. nimCopy(nodesFrom = c('x[1]', 'x[2]'), nodesTo = c('y[2]', 'y[1]')) will fail because nodesFrom is one block but nodesTo is two blocks

-- Fixed issue that chol(A+B) was being translated to chol(A) + B


                     CHANGES IN VERSION 0.1-1 (Aug. 28, 2014)


BUG FIXES

-- handling of spaces in installed directory name on Windows

-- ensured that various Makevars and Makevars.in and Makevars.win files are
  provided in the package for proper installation on all platforms
