...
 
Commits (2)
Package: spam
Type: Package
Title: SPArse Matrix
Version: 2.5-0
Date: 2019-12-05
Version: 2.5-1
Date: 2019-12-12
Authors@R: c(person("Reinhard", "Furrer", role = c("aut", "cre"),
email = "reinhard.furrer@math.uzh.ch"),
person("Florian", "Gerber", role = c("aut"),
......@@ -59,4 +59,3 @@ LazyData: true
License: LGPL-2 | BSD_3_clause + file LICENSE
URL: https://www.math.uzh.ch/pages/spam/
BugReports: https://git.math.uzh.ch/reinhard.furrer/spam/issues
RoxygenNote: 6.1.1
# spam 2.5-1
BUG FIXES
* fixing fortran linking warning.
# spam 2.5-0
SIGNIFICANT USER-VISIBLE CHANGES
......
# HEADER ####################################################
# This is file spam/R/deprecated.R. #
# It is part of the R package spam, #
# --> https://CRAN.R-project.org/package=spam #
# --> https://CRAN.R-project.org/package=spam64 #
# --> https://git.math.uzh.ch/reinhard.furrer/spam #
# by Reinhard Furrer [aut, cre], Florian Gerber [aut], #
# Roman Flury [aut], Daniel Gerber [ctb], #
# Kaspar Moesinger [ctb] #
# HEADER END ################################################
validspamobject <- function( ...) {
# .Deprecated('validate_spam()')
message("`validspamobject()` is deprecated. Use `validate_spam()` directly")
validate_spam( ...)
}
spam.getOption <- function(...) {
# .Deprecated(msg="`spam.getOption( arg)` is deprecated.\n Use `getOption( spam.arg)` directly")
message("`spam.getOption( arg)` is deprecated. Use `getOption( spam.arg)` directly")
getOption(...)
}
spam.options <- function(...) {
# .Deprecated(msg="`spam.options( arg)` is deprecated.\n Use `options( spam.arg)` directly")
message("`spam.options( arg)` is deprecated. Use `options( spam.arg)` directly")
if (nargs() == 0) {
tmp <- names(options())
return(options()[ grep( "spam.", tmp)])
}
args <- list(...)
names(args) <- paste0("spam.", names(args))
do.call("options", args)
}
>spam_0.41: moved definitively to GIT. ChangeLog will consist of
`git log`
spam_0.41-0 2014-02-26 (RF)
- addressed several Rdevel CMD check --as-cran Notes.
- minor changes in tests/mle (improving speed)
- minor code tiding
- file header edits
spam_0.40-1 2014-02-20 (Florian Gerber)
- update grid_trace2() and grid_trace2.Rd
- eliminate bug in cov.mat() and correct typo in cov.Rd
add tests/covmat.R tests/covmat.Rout.save
changeset: 4:66173a00f913
tag: tip
user: Reinhard Furrer @ lappi <reinhard.furrer@math.uzh.ch>
date: Wed Aug 21 21:09:05 2013 +0200
summary: Adjusted DESCRIPTION, NEWS, ChangeLog for push to CRAN
changeset: 3:412496cbb8b3
user: Florian Gerber <florian.gerber@math.uzh.ch>
date: Tue Aug 20 15:36:34 2013 +0200
summary: gridBase NOT in dependency. comment germany.Rd about 'fields'
changeset: 2:2526f2c1d501
user: Florian Gerber <florian.gerber@math.uzh.ch>
date: Mon Aug 19 15:42:49 2013 +0200
summary: add plot grid_zoom() and grid_trace2() incl help files.
changeset: 1:2929fe7a2799
user: Florian Gerber <florian.gerber@math.uzh.ch>
date: Tue Aug 06 14:31:11 2013 +0200
summary: Test hg, small changes in spam0.30-0/man/mcmczoomPlot.Rd
changeset: 0:0029fc2741f4
user: Reinhard Furrer <reinhard.furrer@math.uzh.ch>
date: Mon Aug 05 13:53:20 2013 +0200
summary: First Version that runs...
Dear Emacs, please make this -*-Text-*- mode!
**************************************************
* *
* SPAM VERSION 0.21 *
* *
**************************************************
o New functions bandwidth, permutation, mle[.nomean][.spam],
neg2loglikelihood[.spam].
o Renamed adiag.spam to bdiag.spam.
o Cleaned up argument naming with the rmvnorm.*
suite.
o Varios Fortran code, R code and help file
improvements.
**************************************************
* *
* SPAM VERSION 0.20 *
* *
**************************************************
CHANGES IN R VERSION 0.20-3
o Resolved dependency issues.
CHANGES IN R VERSION 0.20-1,2
o Minor changes to pass the CRAN test.
CHANGES IN R VERSION 0.20-0
o New demos, test functions, datasets.
o Method t for spam.chol.NgPeyton.
o Method Math2 now with signature digits="ANY".
o Update in rmvnorm.canonical, can take a Cholesky structure
as argument.
o New functionality for a sparse times a full matrix
multiplication.
o Minor ajustment in memory allocation of chol.
**************************************************
* *
* SPAM VERSION 0.15 *
* *
**************************************************
CHANGES IN R VERSION 0.15-6
o Minor change in Fortran routines to accomodate some Intel
compilers (pointed out by Tim Hoar).
CHANGES IN R VERSION 0.15-5
o New function adiag.spam, creation of block diagonal sparse
matrices. No method though.
o New functions rmvnorm.spam, rmvnorm.canonical and
rmvnorm.prec to draw multivariate normals.
o New function apply.spam, similar functionality as apply.
o drop is implemented now when subsetting a sparse matrix
with a binary matrix.
o Major overhaul to nearest.dist: zeros are not included.
Old parameters are kept for backwards compatibility.
o Orders/complexities of major algorithms are now described
in the help 'complexity'.
o Using packageStartupMessage in .onAttach.
o Code clean up and help improvements. Changes reflecting the
change to UZH.
o Bugfix in assinging via a nx2 matrix.
CHANGES IN R VERSION 0.15-4
o Changes in help files. Minor code improvements.
o New function powerboost.
o Changes to if(getRversion() >= "x.y"), required for R 2.10.
CHANGES IN R VERSION 0.15-3
o Several bug fixes in the demos due to the changes in
the previous versions.
o Several minior changes in the help files to compile with
the new help parser and to correct for typos.
o Added the demos into the tests directory. Additionally,
tests contains now the proper Rout.saves files.
o In test files, library( spam, warn.conflict=FALSE)
is used to avoid masking messages in R-2.8.0.
Timing output in test files is suppressed.
o Added trivial headers to most files.
o Bug fix in spam.list(), negative values were not correctly
handled.
o Bug fix in subsetting (occured when subsetting very
sparse matrices, memory allocation problem).
CHANGES IN R VERSION 0.15-2
o Method all.equal for matrix-spam signature.
o Bug fix in Fortran function of nearest.dist. Numerical
instabilities could return NaN on diagonal. Additionally,
overhaul of tests/dist.R.
o Several minor improvements in the help files as well
as in function nearest.dist and tests/*.R.
CHANGES IN R VERSION 0.15-1
o Improvements in the nearest.dist function. The diagonals
are now handled consistenly.
o Symmetry check criterion for Cholesky decomposition has been
relaxed from (2+eps)*eps to 100*eps for an easier handling when
working with great circle distance induced covariance matrices.
Same cutoff is used with eigen. Instead of using norm,
we use essentially an isSymmetric.spam test.
o Methods isSymmetric and all.equal for spam.
o Methods image and display for spam.chol.NgPeyton.
o Method as.spam for distance class implemented.
o Complete rewrite of spam.list. Method as.spam for lists
are implemented as well.
o Method spam for spam objects (possibility to rearrange the
dimension) has been eliminated. The approach was based on
creating the full matrix and assigning it back to a spam
object.
o Binary subsetting and subassigning is implemented.
o Bug fix: the Cholesky Fortran routine checks if diagonal
elements are available (and positive).
o Bug fix: in dim<-.spam
o Minor improvements in the help files as well as the following
R functions: norm, .spam.matmul.
CHANGES IN R VERSION 0.15-0
o The devel versions of 14-x have been sitting around for
a while and I was inconsistent with the devel/gold numbering.
To avoid any confusion, I have decided to go to the next
minor version. An additional reason supporting this is
that the version number identification has changed over
the 0.14-devel.
**************************************************
* *
* SPAM VERSION 0.14 *
* *
**************************************************
CHANGES IN R VERSION 0.14-x
o A few rudimentary functions to change between the compressed
sparse row formats of the packages SparseM and Matrix.
Just the functions, no S3/S4 constructs available.
o Functionality to read matrices stored in the Harwell-Boeing
or MatrixMarket formats.Read MatrixMarket.
o Rewritten cbind.spam and rbind.spam. Both can take now
numeric and spam objects. cbind.spam calls now Fortran
code and is now very fast. Rewrite of their help.
o Implemented spam.list to go from a index based list to a
spam matrix. The function triplets does the inverse.
o forwardsolve and backsolve methods for spam objects.
o Implemented the function 'dim<-' for spam objects.
o Method diag and as.matrix for spam.chol.NgPeyton.
o eps is now tested for being at least double precision.
o as.spam.xxx and spam.yyy functions have been streamlined.
o Initializing an empty spam matrix causes a warning but still
coerces to a zero matrix, see new("spam",entries=rep(1,0))
o Eliminated bug in subsetting (occuring when subsetting
for an empty matrix). Clean out subsetting and assigning.
o Include a inst subdirectory containing this file, which
is renamed to NEWS. Once we have reached a stable version
I will maintain a proper CHANGELOG file in the root
directory.
o Proper method handling for kronecker and bug fixes in
kronecker.spam.
o Saved the datasets UScounties.storder/ndorder as spam
objects as assumed by demo article-jss.
o Implemented many 'identical' structures and homogenized zero
matrix handling, throughout the R code. int0, ..., int2 are
internally defined integers.
o Similar changes as for 13-3. Additionally, considerable
improvements in help, file structure, tests, timing, etc.
CHANGES IN R VERSION 0.14-0
Major revision. Slight loss of backwards compatibility.
o New demo article-jss.
o New variable spam.version, similar to the R version
variable.
o Change and adding of a few option names, for example
cholsymmetrycheck, cholpivotcheck, cholupdatesingular,
dopivoting, safemode, ...
See help files for details.
o Complete rewrite of chol. The argument ordering is
now called pivot, more consistent with the generic
function. Two different orderings are implemented.
Uses the new option cholsymmetrycheck.
o Similar changes as in chol in determinant.spam.
o New function update.spam.chol.NgPeyton.
o Invisible/minor changes in method c for spam, in solve.spam,
determinant.chol.NgPeyton
o The class spam.chol.NgPeyton is defined differently.
Accordingly, print and summary methods are updated.
Notably, fill-in ratios are given with summary.
Summary also hands back the length of the vectors holding the
factor and the column indices.
o New methods for spam.chol.NgPeyton, namely, dim, length, c,
dim<-, and length<-. The latter two giving simply errors.
o Along the redefinition of the class spam.chol.NgPeyton,
forwardsolve.spam and backsolve.spam are updated.
Use now the option dopivoting.
o kronecker.r is implemented.
o nearest.dist, a function to calculate close distances
within one or two sets of locations is implemented.
Roughly speaking, it is the union of dist in base and
rdist/rdist.earth in fields. (comes with options
nearestdistincreasefactor and nearestdistnnz).
o print and show now emphasize that the non-zero elements
are row-wise printed.
o UScounties is a dataset containing the adjacency matrix
of the first and second order neighbors of the counties
of the lower 48 US states.
o Some changes in help files, especially in the *-class
files.
o Eliminated warnings issued when compiling.
o Minor R and Fortran code cleaning.
o Along the new features, update of CHANGELOG, todo,
NAMESPACE files, etc.
**************************************************
* *
* SPAM VERSION SERIES 0.13 *
* *
**************************************************
CHANGES IN R VERSION 0.13-3
o Minor changes in R and Fortran code to eliminate warnings.
o In diag()'s argument list, drop the explicit default (' = n').
As is now in R-2.7.
CHANGES IN R VERSION 0.13-2
o New spam.options and getOption functions. .Spam
as a variable is not visible anymore.
o Retrieving information from the DESCRIPTION file directly
(thanks to Roger Bivand).
CHANGES IN R VERSION 0.13-1
o Minor Fortran Changes for g77 compatibility. Thanks to
Roger Bivand.
o Updated DESCRIPTION file.
CHANGES IN R VERSION 0.13
o Updated NAMESPACE (for versions > 2.5).
o Some changes in help files.
o Cleaned Fortran source files (eliminated unused
subroutines and used the posted complier output to
straighten details).
o Implemented more efficient transpose Fortran code.
This also eliminates a bug when transposing a 1 row
matrix.
o Eliminated bug when assigning with a 1 row matix.
o Eliminated bug (Fortran code) that could potentially
occur when assigning.
o Eliminated bug when plotting a 1 row matix.
o Minor R code cleaning.
**************************************************
* *
* SPAM VERSION 0.12 *
* *
**************************************************
o Updated NAMESPACE and DESCRIPTION file.
o print and summary pass back NULL instead of the
object.
o Changed to prod(x@dimension) instead of nrow*ncol to
overcome integer overflow for very large matrices.
o Introduced a prototype in the definition of spam
and spam.chol.*.
o .Spam$safemode also determines if a spam object is
tested for validity, as well as for NAOK.
o In many functions sparse matrix construction is
done manually using slots (and check=FALSE, if
approprate).
o Increased the value of symmetry criteria to
(2+eps)*eps, as each element can be off by eps,
subtraction leads to a 2*eps offset and yet we are
symmetric.
o Major restructuration of chol/det with elimination
of auxiliarychol.
o Methods chol/backsolve/forwarsolve now call the *.spam
functions.
o Many internal changes to favour speed and efficiency.
o Bug fix in .spam.elemul. occuring when the result is the
zero matrix.
CHANGES IN VERSION 2.2-0
SIGNIFICANT USER-VISIBLE CHANGES
o Implementation of 'eigen.spam' and 'eigen_approx' to calculate
eigenvalues and eigenvectors for sparse matrices.
o 'germany.plot' has new argument 'cex.main'.
BUG FIXES
o 'NAOK=TRUE' did not properly dispatch in all matrix multiplications.
o '.newSpam()' was not always properly called, causing possible errors
when creating empty 'spam' objects.
INTERNAL CHANGES
o Code cleaning and coherence improvements.
CHANGES IN VERSION 2.1-2
SIGNIFICANT USER-VISIBLE CHANGES
o In case 64bits are required, issues an error to load package
'spam64' first.
o Minor fixes in help files and other documentation.
INTERNAL CHANGES
o Improved registering of compiled functions
o Compatibility with new versions of package 'testthat'.
CHANGES IN VERSION 2.1-1
SIGNIFICANT USER-VISIBLE CHANGES
o With the addon of the package spam64, we have truly 64 bits
available!
o Dependency on dotCall64.
o Different option handling, we use now the classical R setting.
For the moment, the old functionality throws a message but in
upcoming versions we use `.Deprecated`.
'spam.options' -> 'options', 'spam.getOption' -> 'getOption'
o 'validate_spam' superseeds 'validspamobject'.
o Added the list of Fortran contributors.
INTERNAL CHANGES
o Many... many. More still to come.
o Unit testing with testthat.
o Change of archaic trig functions to standard.
Minor edits to great circle dist.
CHANGES IN VERSION 1.4-0
INTERNAL CHANGES
o Fortran modification to address more pedantic compilations.
CHANGES IN VERSION 1.3-0
BUG FIXES
o Adding nonsparse to sparse matrices did not always dispatch
properly and caused some errors. Thanks to Johan Lindström
for pointing out.
SIGNIFICANT USER-VISIBLE CHANGES
o Help improvements
o Added additional method dispatching for 'all.equal'.
CHANGES IN VERSION 1.2-0 and 1.2-1
SIGNIFICANT USER-VISIBLE CHANGES
o Renaming of demos from JSS10 paper.
o Continuing to implement 'spam_xxx' function names:
Like 'spam_rdist' there is now 'spam_diag'.
o 'subset.rows.spam' deprecated. There is an internal function
'subset_rows.spam'.
INTERNAL CHANGES
o Ample minor modifications in 'DESCRIPTION' and 'NAMESPACE'
for CRAN check conformity.
o Elimination of a few unnecessary functions (not exported).
o Minor modifications in tests.
CHANGES IN VERSION 1.1-0
SIGNIFICANT USER-VISIBLE CHANGES
o Upload of vignette linked to JSS15 paper. Related demos
and tests.
o "DUP=FALSE" is deprecated and will be disabled in future
versions of R. All "DUP" arguments have been eliminated.
You have to expect a slightly slower version of spam.
CHANGES IN VERSION 1.0 and 1.0-1
o This version is up to 'DESCRIPTION' and its implied changes
identical to 0.90-1. With the upcoming JSS article "Pitfalls
in the implementation of Bayesian hierarchical modeling of
areal count data. An illustration using BYM and Leroux
models." a "major" version jump is adequate.
o Referencing to spam data through spam::...
o Implemented `1.1.3.1 Suggested packages` approach.
CHANGES IN VERSION 0.70/0.80/0.90/0.90-1
SIGNIFICANT USER-VISIBLE CHANGES
o Introduction of many as('spam','...') functions.
o Coercion function `as.vector` for spam objects.
o Wrapper functions `spam_rdist` and 'spam_rdist.earth`
for smooth use in `fields`.
o The use of `update(A, B)` without assignment has been
eliminated. This is one way to address the change in
memory handling changes from R 3.0.2 to R 3.1.0.
There is a slight overhead in memory. If this causes
problems, let me know.
o Adjustment of the license.
NEW FEATURES
o Arguments `diag` and `eps` in `nearest.dist` cause now
an error.
o Further augmented help pages.
BUG FIXES
o The demo now points to the new JSS article.
INTERNAL CHANGES
o Set 'structurebased=TRUE' for the demos.
o Link to upcoming JSS article in one of the demos.
o 'update.spam.chol.NgPeyton' preserves the structure
(pointed out by Chris Paciorek), see above.
o Using similar License approach as SparseM. New files
`README`, `inst/0LICENSE`.
o File renaming (OChangeLog -> 0ChangeLog)
o Adjusted error messages for precmat.RW2
CHANGES IN VERSION 0.60-0
SIGNIFICANT USER-VISIBLE CHANGES
o Using the flag 'structurebased', the behavior
of spam is now more consistent.
o "Arith", "Compare", "Logic" (getGroupMembers("Ops"))
have now a consistent behavior.
NEW FEATURES
o Few new S3 functions for simplicity:
'var.spam', 'eigen.spam', ...
o New constructor functions 'colindices<-' etc.
Maybe additional tests may be required.
o Operators from 'Arith' obey now the
structure based calculation.
BUG FIXES
o 'inefficiencywarning' passes message correctly.
INTERNAL CHANGES
o many more spam/tests/*.
o Consistent use of 'spam' and 'vector' siglist for 'Ops'.
o Minor cleaning of Fortran code.
o Renaming/restructuring/cleaning of files...
o Fortran arguments are copied when updating the cholesky
structure.
CHANGES IN VERSION 0.50-0
SIGNIFICANT USER-VISIBLE CHANGES
o Using the flag 'structurebased=FALSE', the behavior
of spam is now much, much closer to regular matrix
calculations. This is illustrated when calculating
gamma of a sparse matrix.
o Along the same lines, the flag 'NAOK=TRUE' allows the
use of the "not finite numbers" (NA, NaN, Inf).
We have tested many, many functions but full fledged
use is not yet guaranteed.
o Currently, we can still guarantee backwards
compatibility...
NEW FEATURES
o New functions 'crossprod' and 'tcrossprod' as well
as according method definitions.
o New constructor functions 'rowpointers<-' etc.
o Better option handling. The option 'safemode' is
now 'safemodevalidity'. Additionally, new option
'NAOK'.
o Help pages have been improved.
o Operators from 'Summary' and 'Math' obey now the
structure based calculation.
('Math2' inherently does).
BUG FIXES
o rmvnorm.[].const now work properly for any number of
constraints and n.
o Assignment handles properly recycling.
o todo() now works properly.
INTERNAL CHANGES
o eliminated {d,i}check by equivalent coercion.
o Consistent use of NAOK in Fortran calls.
o Minor cleaning of Fortran code.
o Renaming/restructuring of files...
CHANGES IN VERSION 0.42-0
NEW FEATURES
o More consistent handling of subsetting.
Warning is issued if subsetting with NA
BUG FIXES
o Fixed several issues when rowsubsetting...
INTERNAL CHANGES
o Additional tests for positive definiteness in 'chol'.
CHANGES IN VERSION 0.41-0
NEW FEATURES
o Functions grid_trace2() received more functionality.
BUG FIXES
o Eliminated bug in cov.mat(). Pointed out by Joshua French
INTERNAL CHANGES
o Updated DESCRIPTION: added Florian Gerber [ctb]
o Minor code and help cleanup. Additional testing files.
File header edits.
o Addressed Rdevel CMD check --as-cran Notes, especially
workaround for DUP=FALSE
CHANGES IN VERSION 0.40-0
BUG FIXES
o A severe bug in subsetting a spam object with a nx2
matrix crept in spam in version 0.29-3.
Thanks to Andrew Hong and Beat Briner for pointing out.
To simplify communication, we have switched increased
the tenth version number.
All other changes are of cosmetic nature.
CHANGES IN VERSION 0.30-x
SIGNIFICANT USER-VISIBLE CHANGES
o Added several plots to visualize several MCMC chains
('grid_trace2', 'grid_zoom', ...).
NEW FEATURES
o New function 'germany.plot' to draw the landkreise.
('map.landkreis' is now obsolete).
o Switched from 'tim.colors' to 'colorRampPalette'
in 'germany.plot'.
o Metadata in 'germany.info', polygon definitions in
'germany.poly' ('germany' kept for backwards
compatibility).
INTERNAL CHANGES
o Switched to mercurial for maintaining the package.
o Updated ChangeLog file (hg log).
o Increased dependency to >= R 2.15.
o Minor code and help cleanup.
CHANGES IN VERSION 0.29-0, 0.29-1, 0.29-2, 0.29-3
SIGNIFICANT USER-VISIBLE CHANGES
o There is a generic conflict with 'backsolve' between spam
and other packages (e.g., bdsmatrix). To avoid the issue,
we use the standard generic implemented in 'methods' which
requires an additional argument for version 0.29-0 (see
also PR#14883).
However to maintain backwards compatibility with packages
that depend on spam, this was reverted in 0.29-1.
Currently, this conflict is not properly solved. I propose
to load 'spam' first then the other packages, followed by
manually calling:
setMethod("backsolve","spam.chol.NgPeyton",backsolve.spam)
setMethod("backsolve","spam",backsolve.spam)
Stay tuned...
o Calls like:
mat <- diag.spam(4)
diag( mat[-1,]) <- 3
diag.spam( mat[,-1]) <-2
now work. They are, however, somewhat inefficient.
'toeplitz.spam' is to be prefered. Pointed out by
Florian Gerber.
o The Gibbs sampler in the demo article-jss-example2 contains
several bugs, pointed out by Steve Geinitz and Andrea Riebler.
I'll post an updated sampler in a future release.
NEW FEATURES
o New functions 'rmvnorm.const', 'rmvnorm.prec.const' and
'rmvnorm.canonical.const' to draw constrained multivariate
normal variates.
o New functions 'precmat' (wrapper to), 'precmat.RW1', 'precmat.RW2',
'precmat.season', 'precmat.IGMRFreglat' and 'precmat.IGMRFirreglat'
to create precision matrices for IGMRF.
o New methods 'rowSums', 'colSums' and 'rowMeans', 'colMeans' for
'spam' objects.
o New methods 'head' and 'tail' for 'spam' and 'spam.chol.NgPeyton'
objects.
o New method 'chol2inv' for 'spam' object.
o New option 'inefficiencywarning': handling of warnings issued
in case of an inefficient calculation.
o New option 'structurebased': should operations be performed on
the nonzero entries or on including the zeros. Classical example:
what should the cosine of a sparse matrix look like?
In the near future, all operations from Math and Ops will include
this option. Some loss of backwards compatibility might be
lost in the future.
INTERNAL CHANGES
o New much faster approach to extract rows. For not too sparse
large matrices improvements over two orders of magnitudes are
achieved.
o Elininated '.Internal()' calls that induce a 'Note' on CRAN
checks. This also implied a minor rewrite of 'image.spam'.
o Minor code improvements.
o Eliminated non-API calls (29.1).
o Rewritten .C("bincode",...) call as suggested by Brian Ripley
(29.2).
BUG FIXES
o Bug fix that occures when multiplying elementwise matrices
that have non-intersecting structures (pointed out by
Corentin Barbu).
o Bug fix in triangular backsolves involving 'spam' objects
and rhs matrices.
o Bug fix in triangular backsolve causing errors on some
architectures.
CHANGES IN VERSION 0.28
NEW FEATURES
o New function 'cleanup' (suggested by Simon Barthelme).
o Extending help files.
o Improved functionality of 'isSymmetric'.
INTERNAL CHANGES
o Proper storage of data files.
o Cleaning up argument names within spam functions.
o Cleaning up old Fortran code, i.e., eliminating
unnecessary subroutines and write calls.
BUG FIXES
o Bug fix that may occure when extracting zero elements
(pointed out by Corentin Barbu).
CHANGES IN VERSION 0.27
NEW FEATURES
o Requires now R2.10 and higher.
o Functions to create Toeplitz and circulant matrices.
o Function to create precision matrices for gridded GMRF.
o Improvements in the mle.* functions.
o Method diff for sparse matrices (suggested by Paul Eilers).
o Improvement of help pages.
o Eliminated some help aliases to base functions
(for which no 'usage' is given).
INTERNAL CHANGES
o Change to iL coding.
o Start to using 'identical'.
o Code cleaning due to requirement of R2.10 and higher.
BUG FIXES
o Bug fix in as.spam.list (thanks to Paul Eilers).
o Bug fix in demo(spam) (thanks to Thomas Gsponer).
CHANGES IN VERSION 0.24, 0.25 and 0.26
o Devel versions, not released.
CHANGES IN VERSION 0.23
NEW FEATURES
o Further improved versions of demos.
o Some improvements to meet Rd standards.
Adjustments for future R versions.
CHANGES IN VERSION 0.22
NEW FEATURES
o Improved versions of demos. Synchronized with the JSS article.
o Additional changes and improvements in the help files (thanks
to Steve Geinitz).
CHANGES IN VERSION 0.21
NEW FEATURES
o New NEWS file, to work better with news() command.
The previous is available under ONEWS.
o New functions bandwidth, permutation, mle[.nomean][.spam],
neg2loglikelihood[.spam].
o Renamed adiag.spam to bdiag.spam.
o Cleaned up argument naming with the rmvnorm.*
suite.
INTERNAL CHANGES
o Various Fortran code, R code and help file
improvements.
BUG FIXES
o Minor change in one of the demos (solves a 64bit issue).
% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is file spam/man/history.spam.Rd. %
% It is part of the R package spam, %
% --> https://CRAN.R-project.org/package=spam %
% --> https://CRAN.R-project.org/package=spam64 %
% --> https://git.math.uzh.ch/reinhard.furrer/spam %
% by Reinhard Furrer [aut, cre], Florian Gerber [ctb], %
% Roman Flury [ctb], Daniel Gerber [ctb], %
% Kaspar Moesinger [ctb] %
% HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{history}
\alias{history.spam}
\alias{spam.history}
\alias{history}
\title{Brief Overview of the History}
\description{Brief overview of \code{spam}s history}
\usage{
spam.history()
}
\details{Many years ago, I required sparse matrix algebra capacities in
\R for my research. The packages available at that time where not
necessarily satisfying for my purpose. Hence, I started writing my own
functions, somewhat inspired by the package \code{SparseM}.
Over the years, I decided to write an \R package, called \code{spam}.
In mean time, we have tree significant sparse matrix packages posted
on CRAN. I believe that all three have their own niche of users.
I believe that \code{spam} is stable, useful but definitely not fully
matured. I appreciate all comments and remarks.
There is no need to maintain here a complete list of changes. Older
versions are available on CRAN (>0.11), each coming with a proper
history file.
}
\references{See also a more detailed description at
\url{http://www.math.uzh.ch/furrer/software/spam/history.shtml}.}
\seealso{\code{\link{todo}}.}
\examples{
\dontrun{
## A complete history of changes
file.show(system.file("NEWS", package = "spam"))
file.show(system.file("0NEWS", package = "spam"))
}
}
\keyword{internal}
% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is file spam/man/todo.Rd. %
% It is part of the R package spam, %
% --> https://CRAN.R-project.org/package=spam %
% --> https://CRAN.R-project.org/package=spam64 %
% --> https://git.math.uzh.ch/reinhard.furrer/spam %
% by Reinhard Furrer [aut, cre], Florian Gerber [ctb], %
% Roman Flury [ctb], Daniel Gerber [ctb], %
% Kaspar Moesinger [ctb] %
% HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{todo}
\alias{todo.spam}
\alias{todo}
\title{Small "ToDo" list}
\description{List of what needs to be done within \code{spam}
}
\usage{
todo()
}
\details{This is a non exhaustive list of where we need to work on spam
(of course the list is in random order):\cr
- extend demo(s)\cr
- write vignette\cr
- complete help files\cr
%Especially, there are still a few functions
%commented in various 'usage' sections (to avoid warnings when checking
%the library).\cr
- extend basic matrix operatation, comparisons, etc: \cr
\code{unique}, \code{duplicated}, ...
- improve subsetting via row extraction, incorporate matrix permutation\cr % xtrows
% - extend methods for \code{spam.chol.NgPeyton}: \cr
% e.g., \code{diag} => done
- implement other Cholesky routines (one eye glances to the LDL library). \cr
- what about an LU/SVD decomposition?\cr
% - implement \code{backsolve} and \code{forwardsolve} for \code{spam} class.\cr => done
% - it might be useful to implement certain lines of code in Fortran:
% say \code{rbind}, \code{cbind}, ...\cr => done
Any other items are welcome (\email{reinhard.furrer@math.uzh.ch}).\cr
}
\keyword{internal}
......@@ -912,8 +912,6 @@ C
C***********************************************************************
implicit none
C
logical, external :: neZERO
INTEGER NSUPER
INTEGER LINDX(*) , XSUPER(*)
INTEGER XLINDX(*) , XLNZ(*)
......@@ -943,11 +941,11 @@ C -------------------------
CDIR$ IVDEP
DO 400 IX = IXSTRT+1, IXSTOP
I = LINDX(IPNT)
IF (neZERO(RHS(I))) T = T - LNZ(IX)*RHS(I)
IF (abs(RHS(I)) .GT. 0.D0) T = T - LNZ(IX)*RHS(I)
IPNT = IPNT + 1
400 CONTINUE
IF(neZERO(T)) THEN
IF(abs(T) .GT. 0.D0) THEN
RHS(JCOL) = T/LNZ(IXSTRT)
ELSE
RHS(JCOL) = 0.D0
......@@ -1002,8 +1000,6 @@ C
C***********************************************************************
C
implicit none
logical, external :: neZERO
INTEGER NSUPER
INTEGER LINDX(*) , XSUPER(*)
......@@ -1031,7 +1027,7 @@ C ------------------------
DO 200 JCOL = FJCOL, LJCOL
IXSTOP = XLNZ(JCOL+1) - 1
IF (neZERO(RHS(JCOL))) THEN
IF (abs(RHS(JCOL)) .GT. 0.D0) THEN
T = RHS(JCOL)/LNZ(IXSTRT)
RHS(JCOL) = T
IPNT = JPNT + 1
......@@ -1094,7 +1090,6 @@ C
C***********************************************************************
C
implicit none
logical, external :: neZERO
INTEGER NSUPER
INTEGER LINDX(*) , XSUPER(*)
......@@ -1122,7 +1117,7 @@ C ------------------------
DO 200 JCOL = FJCOL, LJCOL
IXSTOP = XLNZ(JCOL+1) - 1
IF (neZERO(RHS(JCOL))) THEN
IF (abs(RHS(JCOL)) .GT. 0.D0) THEN
T = RHS(JCOL)/LNZ(IXSTRT)
RHS(JCOL) = T
IPNT = JPNT + 1
......@@ -1155,11 +1150,11 @@ C -------------------------
CDIR$ IVDEP
DO 400 IX = IXSTRT+1, IXSTOP
I = LINDX(IPNT)
IF(neZERO(RHS(I))) T = T - LNZ(IX)*RHS(I)
IF(abs(RHS(I)) .GT. 0.D0) T = T - LNZ(IX)*RHS(I)
IPNT = IPNT + 1
400 CONTINUE
IF (neZERO(T)) THEN
IF (abs(T) .GT. 0.D0) THEN
RHS(JCOL) = T/LNZ(IXSTRT)
ELSE
RHS(JCOL) = 0.D0
......
function eqZERO( a)
implicit none
logical eqZERO
double precision a
eqZERO = (abs( a) .LE. 1.1*epsilon( 0.0))
return
end function
function neZERO( a)
implicit none
logical neZERO
double precision a
neZERO = (abs( a) .GT. 1.1*epsilon( 0.0))
return
end function
function eqREAL( a, b)
implicit none
logical eqREAL
double precision a, b
eqREAL = (abs( a - b) .LE. 1.1*epsilon( 0.0))
return
end function
function neREAL( a, b)
implicit none
logical neREAL
c double precision eps
c parameter (eps = 1d-14)
double precision a, b
c neREAL = abs( a - b) .GT. eps
neREAL = (abs( a - b) .GT. 1.1*epsilon( 0.0))
return
end function
c
c\SCCS Information: @(#)
c FILE: debug.h SID: 2.3 DATE OF SID: 11/16/95 RELEASE: 2
c
c %---------------------------------%
c | See debug.doc for documentation |
c %---------------------------------%
integer logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
common /debug/
& logfil, ndigit, mgetv0,
& msaupd, msaup2, msaitr, mseigt, msapps, msgets, mseupd,
& mnaupd, mnaup2, mnaitr, mneigh, mnapps, mngets, mneupd,
& mcaupd, mcaup2, mcaitr, mceigh, mcapps, mcgets, mceupd
......@@ -83,8 +83,6 @@ c p power for minkowski
implicit none
logical, external :: eqREAL
double precision distfcn
external distfcn
......@@ -136,10 +134,10 @@ c in case nnz was too small, recall line to get a better estimate
endif
colindices(jja) = j
if (eqREAL(p,2)) then
if (abs(p-2) .le. 0.D0) then
entries(jja) = sqrt(tmp)
else
if (eqREAL(p,1)) then
if (abs(p-1) .le. 0.D0) then
entries(jja) = tmp
else
entries(jja) = tmp**pinv
......
......@@ -12,6 +12,32 @@ c dseigt.f
c dstqrb.f
c dsortr.f
c
c
c test for equal zero
c
function eqZERO( a)
implicit none
logical eqZERO
double precision a
eqZERO = (abs( a) .LE. 1.1*epsilon( 0.0))
return
end function
c
c test not equal to zero
c
function neZERO( a)
implicit none
logical neZERO
double precision a
neZERO = (abs( a) .GT. 1.1*epsilon( 0.0))
return
end function
c
c
c\BeginDoc
c
c\Name: dseupd
......
......@@ -85,17 +85,6 @@ c | time spent in the various stages of computation |
c | given by setting msaupd = 1. |
c %-------------------------------------------------%
c
cm include 'debug.h'
cm ndigit = -3
cm logfil = 6
cm msgets = 0
cm msaitr = 0
cm msapps = 0
cm msaupd = 0
cm msaup2 = 0
cm mseigt = 0
cm mseupd = 0
c
c %-------------------------------------------------%
c | The following sets dimensions for this problem. |
c %-------------------------------------------------%
......@@ -113,7 +102,6 @@ c
else if (iwhich .eq. 9) then
which = 'BE'
else
CcC callintpr(' Error: Invalid mode.', -1, 0, 0)
c
goto 9000
end if
......@@ -231,8 +219,6 @@ c %--------------------------%
c | Error message. Check the |
c | documentation in DSAUPD. |
c %--------------------------%
c
c call errpr (info)
c
goto 9000
c
......@@ -277,8 +263,6 @@ c %------------------------------------%
c | Error condition: |
c | Check the documentation of DSEUPD. |
c %------------------------------------%
c
c call errpr (ierr)
c
goto 9000
c
......
c *****************************************************************************
c
c print function for errorflags from __aupd/__eupd; debugging resp verbose purpose
c
subroutine errpr ( errf )
c
implicit none
c
integer errf
c
if ( errf .eq. 0 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' Normal exit', -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .gt. 0 ) then
c
if ( errf .eq. 1 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' Maximum number of iterations taken.', -1, 0, 0)
call intpr(' Increase the argument nitr or ncv.', -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
end if
c
call intpr(' ', -1, 0, 0)
call intpr(' Workload of the requested eigenvalues is too high.',
& -1, 0, 0)
call intpr(' Increase nitr and decrease ncv.', -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else
c
call intpr(' ', -1, 0, 0)
call intpr(' ERROR in the Implicitly Restarted Arnoldi Process.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
if ( errf .eq. -1 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' Dimension of input matrix is not positive.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -2 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' Requested eigenvalues must be positive.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -3 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' The number of requested eigenvalues is too high.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -4 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' The maximum number of Arnoldi update',
& -1, 0, 0)
call intpr(' iterations allowed must be greater than zero.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -5 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' WHICH must be one of LA,SA,LM,SM or LR,SR,LI,SI.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -14 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' The accuracy of the eigenvalues',
& -1, 0, 0)
call intpr(' is not sufficent enough.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else if ( errf .eq. -9999 ) then
c
call intpr(' ', -1, 0, 0)
call intpr(' Could not build an Arnoldi factorization',
& -1, 0, 0)
call intpr(' try to increase ncv and nitr.',
& -1, 0, 0)
call intpr(' ', -1, 0, 0)
c
else
c
call intpr(' ', -1, 0, 0)
call intpr(' Fatal error in fortran source, ',
& -1, 0, 0)
call intpr(' The ERRORFLAG is = ', -1, errf, 4)
call intpr(' ', -1, 0, 0)
c
end if
c
end if
c
end
c
SUBROUTINE SECOND( T )
*
REAL T
*
* -- LAPACK auxiliary routine (preliminary version) --
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
* Courant Institute, Argonne National Lab, and Rice University
* July 26, 1991
*
* Purpose
* =======
*
* SECOND returns the user time for a process in seconds.
* This version gets the time from the system function ETIME.
*
* .. Local Scalars ..
REAL T1
* ..
* .. Local Arrays ..
REAL TARRAY( 2 )
* ..
* .. External Functions ..
* REAL ETIME
* EXTERNAL ETIME
* ..
* .. Executable Statements ..
*
* T1 = ETIME( TARRAY )
* T = TARRAY( 1 )
RETURN
*
* End of SECOND
*
END
......@@ -1806,7 +1806,6 @@ c----------------------------------------------------------------------c
subroutine spamforward (n,p,x,b,l,jl,il)
implicit none
logical, external :: eqZERO
integer n, p, jl(*),il(n+1)
double precision x(n,p), b(n,p), l(*)
......@@ -1836,7 +1835,7 @@ c Reinhard Furrer June 2008, April 2012, Sept 2016, Nov 2019
c initialize k for next setting
k=0
c if first diagonal element is zero, break
if (eqZERO(l(1))) goto 5
if (abs(l(1)) .le. 0.D0) goto 5
c cycle over all columns of b
do i=1,p
......@@ -1850,7 +1849,7 @@ c first row has one element then cycle over all rows
t = t-l(j)*x(jl(j),i)
else
if (jl(j) .eq. k) then
if (eqZERO(l(j))) goto 5
if (abs(l(j)) .le. 0.D0) goto 5
c diagonal element is not zero, hence we divide and leave the loop
x(k,i) = t / l(j)
goto 3
......@@ -1867,7 +1866,6 @@ c diagonal element is not zero, hence we divide and leave the loop
c-----------------------------------------------------------------------
subroutine spamback (n,p,x,b,r,jr,ir)
implicit none
logical, external :: eqZERO
integer n, p, jr(*),ir(n+1)
double precision x(n,p), b(n,p), r(*)
......@@ -1892,7 +1890,7 @@ c--------------------------------------------------------------------
c Reinhard Furrer June 2008, April 2012, Sept 2016, Nov 2019
k = n+1
if (eqZERO( r(ir(n+1)-1))) goto 5
if (abs( r(ir(n+1)-1) ) .le. 0.D0) goto 5
do l=1,p
x(n,l) = b(n,l) / r(ir(n+1)-1)