File: addAlgorithm.Rd

package info (click to toggle)
r-cran-batchtools 0.9.15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,416 kB
  • sloc: ansic: 172; sh: 156; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 1,645 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Algorithm.R
\name{addAlgorithm}
\alias{addAlgorithm}
\alias{Algorithm}
\alias{removeAlgorithms}
\title{Define Algorithms for Experiments}
\usage{
addAlgorithm(name, fun = NULL, reg = getDefaultRegistry())

removeAlgorithms(name, reg = getDefaultRegistry())
}
\arguments{
\item{name}{[\code{character(1)}]\cr
Unique identifier for the algorithm.}

\item{fun}{[\code{function}]\cr
  The algorithm function. The static problem part is passed as \dQuote{data}, the generated
  problem instance is passed as \dQuote{instance} and the \code{\link{Job}}/\code{\link{Experiment}} as \dQuote{job}.
  Therefore, your function must have the formal arguments \dQuote{job}, \dQuote{data} and \dQuote{instance} (or dots \code{...}).

  If you do not provide a function, it defaults to a function which just returns the instance.}

\item{reg}{[\code{\link{ExperimentRegistry}}]\cr
Registry. If not explicitly passed, uses the last created registry.}
}
\value{
[\code{Algorithm}]. Object of class \dQuote{Algorithm}.
}
\description{
Algorithms are functions which get the code{data} part as well as the problem instance (the return value of the
function defined in \code{\link{Problem}}) and return an arbitrary R object.

This function serializes all components to the file system and registers the algorithm in the \code{\link{ExperimentRegistry}}.

\code{removeAlgorithm} removes all jobs from the registry which depend on the specific algorithm.
\code{reg$algorithms} holds the IDs of already defined algorithms.
}
\seealso{
\code{\link{Problem}}, \code{\link{addExperiments}}
}