Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
This commit has all the edits
Browse files Browse the repository at this point in the history
  • Loading branch information
saptarshiguha committed Aug 21, 2019
1 parent 03f31a1 commit 4afa62b
Show file tree
Hide file tree
Showing 43 changed files with 9,779 additions and 7,871 deletions.
7,655 changes: 0 additions & 7,655 deletions R-3.6.1/doc/NEWS

This file was deleted.

Binary file removed R-3.6.1/doc/NEWS.pdf
Binary file not shown.
10 changes: 7 additions & 3 deletions R-3.6.1/share/make/vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@

## There is also 'translations', but that is not Priority: base
## so it can be handled by update.packages() in due course.
R_PKGS_BASE = base tools utils grDevices graphics stats datasets methods grid splines stats4 tcltk compiler parallel
#R_PKGS_BASE = base tools utils grDevices graphics stats datasets methods grid splines stats4 tcltk compiler parallel
## datasets needs stats
R_PKGS_BASE = base tools utils grDevices graphics stats datasets methods grid splines stats4 compiler parallel
## Those which can be installed initially compiled (not base tools)
R_PKGS_BASE1 = utils grDevices graphics stats datasets methods grid splines stats4 tcltk parallel
#R_PKGS_BASE1 = utils grDevices graphics stats datasets methods grid splines stats4 tcltk parallel
R_PKGS_BASE1 = utils grDevices graphics stats datasets methods grid splines stats4 parallel
## Those with standard R directories (not datasets, methods)
R_PKGS_BASE2 = base tools utils grDevices graphics stats grid splines stats4 tcltk compiler parallel
#R_PKGS_BASE2 = base tools utils grDevices graphics stats grid splines stats4 tcltk compiler parallel
R_PKGS_BASE2 = base tools utils grDevices graphics stats grid splines stats4 compiler parallel

R_PKGS_RECOMMENDED = MASS lattice Matrix nlme survival boot cluster codetools foreign KernSmooth rpart class nnet spatial mgcv
# there are dependencies in src/library/Recommended/Makefile*
Expand Down
11 changes: 6 additions & 5 deletions R-3.6.1/src/appl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ subdir = src/appl
include $(top_builddir)/Makeconf

SOURCES_C = \
integrate.c interv.c maxcol.c optim.c pretty.c uncmin.c
SOURCES_F = \
dchdc.f dpbfa.f dpbsl.f dpoco.f dpodi.f dpofa.f dposl.f dqrdc.f \
dqrdc2.f dqrls.f dqrsl.f dqrutl.f dsvdc.f dtrco.f dtrsl.f
integrate.c interv.c maxcol.c optim.c pretty.c uncmin.c dtrsl.c dpofa.c dqrdc2.c dqrutl.c dpbfa.c dqrsl.c dqrdc.c dpbsl.c dsvdc.c dtrco.c dqrls.c
SOURCES_F =
# dqrls.f
# dchdc.f dpbfa.f dpbsl.f dpoco.f dpodi.f dpofa.f dposl.f dqrdc.f
# dqrdc2.f dqrls.f dqrsl.f dqrutl.f dsvdc.f dtrco.f dtrsl.f
DEPENDS = $(SOURCES_C:.c=.d)
OBJECTS_BLAS = @USE_EXTERNAL_BLAS_FALSE@ blas.o @COMPILE_FORTRAN_DOUBLE_COMPLEX_FALSE@ cmplxblas.o
OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o) \
Expand All @@ -28,7 +29,7 @@ DISTFILES = \
$(SOURCES_C) \
$(SOURCES_F)

@WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO)
@WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) -I.
@WANT_R_SHLIB_TRUE@ALL_FFLAGS = $(ALL_FFLAGS_LO)

Rblas_la = libRblas$(R_DYLIB_EXT)
Expand Down
143 changes: 143 additions & 0 deletions R-3.6.1/src/appl/dpbfa.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/* dpbfa.f -- translated by f2c (version 20190311).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the command line, as in
cc *.o -lf2c -lm
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
http://www.netlib.org/f2c/libf2c.zip
*/

#include "f2c.h"

/* Table of constant values */

static integer c__1 = 1;

/* Subroutine */ int dpbfa_(doublereal *abd, integer *lda, integer *n,
integer *m, integer *info)
{
/* System generated locals */
integer abd_dim1, abd_offset, i__1, i__2, i__3;

/* Builtin functions */
double sqrt(doublereal);

/* Local variables */
static integer j, k;
static doublereal s, t;
static integer ik, jk, mu;
extern doublereal ddot_(integer *, doublereal *, integer *, doublereal *,
integer *);


/* dpbfa factors a double precision symmetric positive definite */
/* matrix stored in band form. */

/* dpbfa is usually called by dpbco, but it can be called */
/* directly with a saving in time if rcond is not needed. */

/* on entry */

/* abd double precision(lda, n) */
/* the matrix to be factored. the columns of the upper */
/* triangle are stored in the columns of abd and the */
/* diagonals of the upper triangle are stored in the */
/* rows of abd . see the comments below for details. */

/* lda integer */
/* the leading dimension of the array abd . */
/* lda must be .ge. m + 1 . */

/* n integer */
/* the order of the matrix a . */

/* m integer */
/* the number of diagonals above the main diagonal. */
/* 0 .le. m .lt. n . */

/* on return */

/* abd an upper triangular matrix r , stored in band */
/* form, so that a = trans(r)*r . */

/* info integer */
/* = 0 for normal return. */
/* = k if the leading minor of order k is not */
/* positive definite. */

/* band storage */

/* if a is a symmetric positive definite band matrix, */
/* the following program segment will set up the input. */

/* m = (band width above diagonal) */
/* do 20 j = 1, n */
/* i1 = max0(1, j-m) */
/* do 10 i = i1, j */
/* k = i-j+m+1 */
/* abd(k,j) = a(i,j) */
/* 10 continue */
/* 20 continue */

/* linpack. this version dated 08/14/78 . */
/* cleve moler, university of new mexico, argonne national lab. */

/* subroutines and functions */

/* blas ddot */
/* fortran max0,sqrt */

/* internal variables */

/* begin block with ...exits to 40 */


/* Parameter adjustments */
abd_dim1 = *lda;
abd_offset = 1 + abd_dim1;
abd -= abd_offset;

/* Function Body */
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
*info = j;
s = 0.;
ik = *m + 1;
/* Computing MAX */
i__2 = j - *m;
jk = max(i__2,1);
/* Computing MAX */
i__2 = *m + 2 - j;
mu = max(i__2,1);
if (*m < mu) {
goto L20;
}
i__2 = *m;
for (k = mu; k <= i__2; ++k) {
i__3 = k - mu;
t = abd[k + j * abd_dim1] - ddot_(&i__3, &abd[ik + jk * abd_dim1],
&c__1, &abd[mu + j * abd_dim1], &c__1);
t /= abd[*m + 1 + jk * abd_dim1];
abd[k + j * abd_dim1] = t;
s += t * t;
--ik;
++jk;
/* L10: */
}
L20:
s = abd[*m + 1 + j * abd_dim1] - s;
/* ......exit */
if (s <= 0.) {
goto L40;
}
abd[*m + 1 + j * abd_dim1] = sqrt(s);
/* L30: */
}
*info = 0;
L40:
return 0;
} /* dpbfa_ */

125 changes: 125 additions & 0 deletions R-3.6.1/src/appl/dpbsl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/* dpbsl.f -- translated by f2c (version 20190311).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the command line, as in
cc *.o -lf2c -lm
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
http://www.netlib.org/f2c/libf2c.zip
*/

#include "f2c.h"

/* Table of constant values */

static integer c__1 = 1;

/* Subroutine */ int dpbsl_(doublereal *abd, integer *lda, integer *n,
integer *m, doublereal *b)
{
/* System generated locals */
integer abd_dim1, abd_offset, i__1, i__2;

/* Local variables */
static integer k;
static doublereal t;
static integer kb, la, lb, lm;
extern doublereal ddot_(integer *, doublereal *, integer *, doublereal *,
integer *);
extern /* Subroutine */ int daxpy_(integer *, doublereal *, doublereal *,
integer *, doublereal *, integer *);


/* dpbsl solves the double precision symmetric positive definite */
/* band system a*x = b */
/* using the factors computed by dpbco or dpbfa. */

/* on entry */

/* abd double precision(lda, n) */
/* the output from dpbco or dpbfa. */

/* lda integer */
/* the leading dimension of the array abd . */

/* n integer */
/* the order of the matrix a . */

/* m integer */
/* the number of diagonals above the main diagonal. */

/* b double precision(n) */
/* the right hand side vector. */

/* on return */

/* b the solution vector x . */

/* error condition */

/* a division by zero will occur if the input factor contains */
/* a zero on the diagonal. technically this indicates */
/* singularity but it is usually caused by improper subroutine */
/* arguments. it will not occur if the subroutines are called */
/* correctly and info .eq. 0 . */

/* to compute inverse(a) * c where c is a matrix */
/* with p columns */
/* call dpbco(abd,lda,n,rcond,z,info) */
/* if (rcond is too small .or. info .ne. 0) go to ... */
/* do 10 j = 1, p */
/* call dpbsl(abd,lda,n,c(1,j)) */
/* 10 continue */

/* linpack. this version dated 08/14/78 . */
/* cleve moler, university of new mexico, argonne national lab. */

/* subroutines and functions */

/* blas daxpy,ddot */
/* fortran min0 */

/* internal variables */


/* solve trans(r)*y = b */

/* Parameter adjustments */
--b;
abd_dim1 = *lda;
abd_offset = 1 + abd_dim1;
abd -= abd_offset;

/* Function Body */
i__1 = *n;
for (k = 1; k <= i__1; ++k) {
/* Computing MIN */
i__2 = k - 1;
lm = min(i__2,*m);
la = *m + 1 - lm;
lb = k - lm;
t = ddot_(&lm, &abd[la + k * abd_dim1], &c__1, &b[lb], &c__1);
b[k] = (b[k] - t) / abd[*m + 1 + k * abd_dim1];
/* L10: */
}

/* solve r*x = y */

i__1 = *n;
for (kb = 1; kb <= i__1; ++kb) {
k = *n + 1 - kb;
/* Computing MIN */
i__2 = k - 1;
lm = min(i__2,*m);
la = *m + 1 - lm;
lb = k - lm;
b[k] /= abd[*m + 1 + k * abd_dim1];
t = -b[k];
daxpy_(&lm, &t, &abd[la + k * abd_dim1], &c__1, &b[lb], &c__1);
/* L20: */
}
return 0;
} /* dpbsl_ */

Loading

0 comments on commit 4afa62b

Please sign in to comment.