https://github.com/cran/fields
Tip revision: 32c60b2ec8167f7d2b26f55147b4e380a8ad77b3 authored by Doug Nychka on 25 September 2011, 00:00:00 UTC
version 6.6.1
version 6.6.1
Tip revision: 32c60b2
radfn2.f
subroutine radfn2(n,d2, par)
c derivative of radial basis function
c r(d2)= d2**(par(1) or par(2).ne. 0 d2**par(1) log( d2)
c
real*8 d2(n), par(2), dtemp, p1,p2
integer n
if( int(par(2)).eq.0) then
p1= par(1)
p2= par(1)-1
c NOTE p2 should be nonnegative
do k =1,n
dtemp= d2(k)
if( dtemp.lt.1e-20) then
d2(k)=0.0
else
d2(k)= p1*(dtemp)**( p2)
endif
enddo
else
do k=1,n
dtemp= d2(k)
if( dtemp.gt.1e-20) then
d2(k)= p1*log(dtemp)*(dtemp)**(p2) +
* dtemp**(p2)
else
d2(k)=0.0
endif
enddo
endif
return
end