Initial commit of the project
This commit is contained in:
35
R/generalized_log.R
Normal file
35
R/generalized_log.R
Normal file
@@ -0,0 +1,35 @@
|
||||
#' @importFrom Rdpack reprompt
|
||||
#'
|
||||
NULL
|
||||
|
||||
#' Generalized logaritmic function.
|
||||
#'
|
||||
#' \deqn{x \longmapsto 1 : \log(x) \approx x-1}
|
||||
#'
|
||||
#'
|
||||
#' @references
|
||||
#' \insertRef{Tsallis:94:00}{ROBITools2}
|
||||
#'
|
||||
#'
|
||||
#' @author Eric Coissac
|
||||
#' @export
|
||||
log.q = function(x,q=1) {
|
||||
if (q==1)
|
||||
log(x)
|
||||
else (x^(1-q)-1)/(1-q)
|
||||
}
|
||||
|
||||
#' Generalized exponential function.
|
||||
#'
|
||||
#'
|
||||
#' @references
|
||||
#' \insertRef{Tsallis:94:00}{ROBITools2}
|
||||
#'
|
||||
#' @author Eric Coissac
|
||||
#' @export
|
||||
exp.q = function(x,q=1,base=exp(1)) {
|
||||
if (q==1)
|
||||
exp(x)
|
||||
else
|
||||
(1 + (1-q)*x)^(1/(1-q))
|
||||
}
|
||||
Reference in New Issue
Block a user