Learn R Programming

TaoTeProgramming (version 1.0)

rectent02: Low entropy plot

Description

A campaign that failed: trying to minimize entropy of an image.

Usage

rectent02(x = array(sample(c(TRUE, FALSE), 4e+06, replace = TRUE), c(2000, 2000)), iterations = 100, inner = 20, fraction = c(0.01, 0.1), seed = NULL, verbose = TRUE) entropy(xmat)

Arguments

x
a matrix of logicals.
xmat
a matrix of logicals.
iterations
the number of major iterations.
inner
the number of iterations in the inner loop.
fraction
controls the size of the inner region that is optimized.
seed
an integer giving the argument for set.seed.
verbose
logical value. If TRUE, then information on the progress of the optimization is printed.

Value

rectent02 and rectent01 return a matrix like the input x.entropy returns a number.

Side effects

modify the random seed.

References

http://www.burns-stat.com/documents/books/tao-te-programming/

See Also

set.seed.

Examples

Run this code
## Not run: 
# entmat1 <- rectent02()
# entmat2 <- rectent02(entmat1, iterations=500)
# image(entmat2)
# image(xor(entmat2, entmat1))
# ## End(Not run)

Run the code above in your browser using DataLab