Skip to content

Commit

Permalink
Merge branch 'master' into feature/fit-inits
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabry authored Apr 15, 2024
2 parents a8297d3 + ced35d1 commit c9a74c1
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ S3method(process_init,CmdStanVB)
S3method(process_init,default)
S3method(process_init,draws)
S3method(process_init,list)
export(as.CmdStanDiagnose)
export(as.CmdStanGQ)
export(as.CmdStanLaplace)
export(as.CmdStanMCMC)
export(as.CmdStanMLE)
export(as.CmdStanPathfinder)
export(as.CmdStanVB)
export(as_cmdstan_fit)
export(as_draws)
export(as_mcmc.list)
Expand Down
54 changes: 54 additions & 0 deletions R/generics.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

#' Coercion methods for CmdStan objects
#'
#' These methods are used to coerce objects into `cmdstanr` objects.
#' Primarily intended for other packages to use when interfacing
#' with `cmdstanr`.
#'
#' @param object to be coerced
#' @param ... additional arguments
#'
#' @name cmdstan_coercion
NULL

#' @rdname cmdstan_coercion
#' @export
as.CmdStanMCMC <- function(object, ...) {
UseMethod("as.CmdStanMCMC")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanMLE <- function(object, ...) {
UseMethod("as.CmdStanMLE")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanLaplace <- function(object, ...) {
UseMethod("as.CmdStanLaplace")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanVB <- function(object, ...) {
UseMethod("as.CmdStanVB")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanPathfinder <- function(object, ...) {
UseMethod("as.CmdStanPathfinder")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanGQ <- function(object, ...) {
UseMethod("as.CmdStanGQ")
}

#' @rdname cmdstan_coercion
#' @export
as.CmdStanDiagnose <- function(object, ...) {
UseMethod("as.CmdStanDiagnose")
}
37 changes: 37 additions & 0 deletions man/cmdstan_coercion.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c9a74c1

Please sign in to comment.