Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add special trace methods (unclutter doTheEvolution)
- Loading branch information
1 parent
bf702be
commit 12fd0f7
Showing
9 changed files
with
185 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#' Single objective result object. | ||
#' | ||
#' Object returned by \code{\link{doTheEvolution}} in case of the objective function | ||
#' being single-objective. | ||
#' | ||
#' It contains ... | ||
#' @name ECRSingleObjectiveResult | ||
#' @rdname ECRSingleObjectiveResult | ||
#FIXME: finish this | ||
NULL | ||
|
||
makeECRSingleObjectiveResult = function( | ||
objective.fun, best, opt.path, control, | ||
population.storage = NULL, stop.object) { | ||
makeS3Obj( | ||
objective.fun = objective.fun, | ||
control = control, | ||
best.param = best$individual, | ||
best.value = best$fitness, | ||
opt.path = opt.path, | ||
population.storage = population.storage, | ||
message = stop.object$message, | ||
classes = "ecr_single_objective_result" | ||
) | ||
} | ||
|
||
#' Multi objective result object. | ||
#' | ||
#' Object returned by \code{\link{doTheEvolution}} in case of the objective function | ||
#' being single-objective. | ||
#' | ||
#' It contains ... | ||
#' @name ECRMultiObjectiveResult | ||
#' @rdname ECRMultiObjectiveResult | ||
#FIXME: finish this | ||
NULL | ||
|
||
makeECRMultiObjectiveResult = function( | ||
objective.fun, opt.path, control, | ||
population.storage, stop.object) { | ||
pareto.inds = getOptPathParetoFront(opt.path, index = TRUE) | ||
makeS3Obj( | ||
objective.fun = objective.fun, | ||
control = control, | ||
opt.path = opt.path, | ||
pareto.front = getOptPathY(opt.path)[pareto.inds, , drop = FALSE], | ||
pareto.set = lapply(pareto.inds, function(i) getOptPathEl(opt.path, i)$x), | ||
pareto.inds = pareto.inds, | ||
classes = "ecr_multi_objective_result" | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/makeECRResult.R | ||
\name{ECRMultiObjectiveResult} | ||
\alias{ECRMultiObjectiveResult} | ||
\title{Multi objective result object.} | ||
\description{ | ||
Object returned by \code{\link{doTheEvolution}} in case of the objective function | ||
being single-objective. | ||
} | ||
\details{ | ||
It contains ... | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/makeECRResult.R | ||
\name{ECRSingleObjectiveResult} | ||
\alias{ECRSingleObjectiveResult} | ||
\title{Single objective result object.} | ||
\description{ | ||
Object returned by \code{\link{doTheEvolution}} in case of the objective function | ||
being single-objective. | ||
} | ||
\details{ | ||
It contains ... | ||
} | ||
|
9 changes: 5 additions & 4 deletions
9
man/autoplot.ecr_result.Rd → man/autoplot.ecr_single_objective_result.Rd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters