R/MixtCompCluster.R

getMixtCompCluster <- function(nbTrialInInit, nbBurnInIter, nbIter){
  # create a new Sem Strategy
  mcStrategy <- new("Strategy", "randomInit", nbTrialInInit, nbBurnInIter, nbIter)
  # create a new MixtCompCluster
  return(new("MixtCompCluster", mcStrategy, new("Results")))
}

setClass(
  Class="MixtCompCluster",
  representation=representation(
    strategy = "Strategy",
    results = "Results"
  ),
  prototype=prototype(
  )
)

setMethod(
  f="initialize",
  signature=c("MixtCompCluster"),
  definition=function(.Object, strategy, results){
    .Object@strategy<-strategy
    .Object@results<-results
    return(.Object)
  }
)

setMethod(
  f="show",
  signature=c("MixtCompCluster"),
  function(object){ 
    show(object@strategy)
    show(object@results)
  }
)

Try the RMixtComp package in your browser

Any scripts or data that you put into this service are public.

RMixtComp documentation built on May 2, 2019, 5:16 p.m.