Print method for the CEoptim object

Description

Produce print method for class "CEoptim"

Usage

1
2
## S3 method for class 'CEoptim'
print(x,...)

Arguments

x

object of class inheriting from "CEoptim"

...

additional arguments: optimizer; optimum; termination;states;states.probs

Details

print method for "CEoptim" class, returns by default the main description of the x object including: optimizer; optimum; termination. To get the states and states.probs outputs, one should specify the corresponding argument to "TRUE".

Author(s)

Tim Benham, Qibin Duan, Dirk P. Kroese, Benoit Liquet

References

Benham T., Duan Q., Kroese D.P., Liquet B. (2015) CEoptim: Cross-Entropy R package for optimization. Journal of Statistical Software, submitted.

See Also

CEoptim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Maximizing the Peaks Function


fun <- function(x){
return(3*(1-x[1])^2*exp(-x[1]^2 - (x[2]+1)^2)
	-10*(x[1]/5-x[1]^3 - x[2]^5)*exp(-x[1]^2 - x[2]^2)
	-1/3*exp(-(x[1]+1)^2 - x[2]^2))}

set.seed(1234)

mu0 <- c(-3,-3); sigma0 <- c(10,10)
 
res <- CEoptim(fun,continuous=list(mean=mu0, sd=sigma0), maximize=TRUE)

## Print method provides by default 
## optimizer; optimum and termination.
print(res)
## To print only the Optimal value of fun
print(res,optimum=TRUE)
## To print only the location of the optimal value
print(res,optimizer=TRUE)
## To print only termination information
print(res,termination=TRUE)