Skip to content

Commit

Permalink
EMOAs now have specialized classes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbossek committed Jun 9, 2016
1 parent 174f9af commit bc9170b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
6 changes: 4 additions & 2 deletions R/emoa.as-emoa.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @template arg_max_time
#' @param ... [any]\cr
#' Further arguments passed to \code{\link{setupECRControl}}.
#' @return [\code{ecr_ecr_multi_objective_result}]
#' @return [\code{ecr_asemoa_result, ecr_multi_objective_result}]
#' @export
asemoa = function(
task,
Expand Down Expand Up @@ -174,7 +174,9 @@ asemoa = function(
ctrl$n.archive = n.archive
ctrl$aspiration.set = aspiration.set

return(doTheEvolution(task, ctrl))
res = doTheEvolution(task, ctrl)
res = BBmisc::addClasses(res, "ecr_asemoa_result")
return(res)
}

# @title
Expand Down
6 changes: 4 additions & 2 deletions R/emoa.nsga2.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#' @template arg_max_time
#' @param ... [any]\cr
#' Further arguments passed to \code{\link{setupECRControl}}.
#' @return [\code{ecr_ecr_multi_objective_result}]
#' @return [\code{ecr_nsga2_result, ecr_multi_objective_result}]
#' @export
nsga2 = function(
task,
Expand Down Expand Up @@ -73,5 +73,7 @@ nsga2 = function(
survival.selector = setupNondomSelector()
)

return(doTheEvolution(task, ctrl))
res = doTheEvolution(task, ctrl)
res = BBmisc::addClasses(res, "ecr_nsga2_result")
return(res)
}
6 changes: 4 additions & 2 deletions R/emoa.sms-emoa.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @template arg_max_time
#' @param ... [any]\cr
#' Further arguments passed to \code{\link{setupECRControl}}.
#' @return [\code{ecr_ecr_multi_objective_result}]
#' @return [\code{ecr_smsemoa_result, ecr_multi_objective_result}]
#' @export
smsemoa = function(
task,
Expand Down Expand Up @@ -79,5 +79,7 @@ smsemoa = function(
stopf("Reference point ref.point needs to have as many components as objectives.")
}

return(doTheEvolution(task, ctrl))
res = doTheEvolution(task, ctrl)
res = BBmisc::addClasses(res, "ecr_smsemoa_result")
return(res)
}
2 changes: 1 addition & 1 deletion man/asemoa.Rd

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

2 changes: 1 addition & 1 deletion man/nsga2.Rd

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

2 changes: 1 addition & 1 deletion man/smsemoa.Rd

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

0 comments on commit bc9170b

Please sign in to comment.