diff --git a/R/addReact.R b/R/addReact.R index 35e6a252a998e9d3147ebc08b7916fbdc6b9b35d..915a5af624f8fa8a62d32441aa33a8aa1d4c13e6 100644 --- a/R/addReact.R +++ b/R/addReact.R @@ -31,19 +31,20 @@ # The algorithm is (more or less) the same. -addReact <- function(model, - id, - met, - Scoef, - reversible = FALSE, - lb = 0, - ub = SYBIL_SETTINGS("MAXIMUM"), - obj = 0, - subSystem = NA, - gprAssoc = NA, - reactName = NA, - metName = NA, - metComp = NA) { +setMethod("addReact", signature(model = "modelorg"), + function(model, + id, + met, + Scoef, + reversible = FALSE, + lb = 0, + ub = SYBIL_SETTINGS("MAXIMUM"), + obj = 0, + subSystem = NA, + gprAssoc = NA, + reactName = NA, + metName = NA, + metComp = NA) { # ------------------------------------------------------------------------ # @@ -410,5 +411,5 @@ addReact <- function(model, return(mod_out) -} +}) diff --git a/R/generics.R b/R/generics.R index 9ba875409869a84ed6f650ef0c00d2e17d50302e..b294389bfb4364df658d908bb0f6cffb79de20bf 100644 --- a/R/generics.R +++ b/R/generics.R @@ -38,6 +38,10 @@ setGeneric(name = "addColsToProb", def = function(lp, ...) { standardGeneric("addColsToProb") } ) +setGeneric(name = "addReact", + def = function(model, ...) { standardGeneric("addReact") } +) + setGeneric(name = "addRows", def = function(lp, nrows, ...) { standardGeneric("addRows") } ) diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 5aec78802c744ea76ce88b866145de3f6693ec64..43eca554405f5e6af8ee75e13a7520e977ecd55b 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -6,6 +6,12 @@ \newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} +\section{Changes in version 2.0.4 2017-07-17}{ + \itemize{ + \item \code{addReact} is now a method of the \code{modelorg} class. + } +} +% ---------------------------------------------------------------------------- % \section{Changes in version 2.0.3 2017-04-20}{ \itemize{ \item Preparation for \code{sybilNLO}.