-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMyAlgorithm.R
48 lines (43 loc) · 1.18 KB
/
MyAlgorithm.R
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
42
43
44
45
46
47
48
#title:...
#help:...
#author:...
#type:...
#output:...
#options:...
#options.help:...
#' constructor and initializer of algorithm
#' @param options algorithm options
#' @return algorithm object : environment options, status
MyAlgorithm <- function(options) {
...
algorithm = new.env()
...
return(algorithm)
}
#' first design building.
#' @param algorithm object handling options, status, ...
#' @param d the number of variables all set in [0,1]
#' @return matrix of first design step
getInitialDesign <- function(algorithm,d) {
...
return(matrix(...,ncol=d))
}
#' iterated design building.
#' @param algorithm object handling options, status, ...
#' @param X matrix of current doe variables (in [0,1])
#' @param Y matrix of current results
#' @return matrix of next doe step
getNextDesign <- function(algorithm,X,Y) {
...
return(matrix(...,ncol=ncol(X)))
}
#' final analysis. All variables are set in [0,1].
#' @param algorithm object handling options, status, ...
#' @param X matrix of current doe variables (in [0,1])
#' @param Y matrix of current results
#' @return HTML string of analysis
displayResults <- function(algorithm,X,Y) {
...
return(html)
}
...