fssa20: Frequency of Sites on a Square Anisotropic 2D lattice with...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

fssa20() function calculates the relative frequency distribution of anisotropic clusters on 2D square lattice with von Neumann (1,0)-neighborhood.

Usage

1
2
fssa20(n=1000, x=33, p=runif(4, max=0.9), 
       set=(x^2+1)/2, all=TRUE, shape=c(1,1))

Arguments

n

a sample size.

x

a linear dimension of 2D square percolation lattice.

p

a vector of relative fractions (0<p)&(p<1) of accessible sites (occupation probability) for lattice directions: (-x,+x,-y,+y).

set

a vector of linear indexes of a starting sites subset.

all

logical; if all=TRUE, mark all sites from a starting subset; if all=FALSE, mark only accessible sites from a starting subset.

shape

a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites.

Details

The percolation is simulated on 2D square lattice with uniformly weighted sites and the vector p, distributed over the lattice directions.

The anisotropic cluster is formed from the accessible sites connected with the initial subset set, and depends on the direction in 2D square lattice.

Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1, 1, -x, x).

Each element of the matrix frq is equal to the relative frequency with which the 2D square lattice site belongs to a cluster sample of size n.

Value

rfq

a 2D matrix of relative sampling frequencies for sites of the percolation lattice.

Author(s)

Pavel V. Moskalev <moskalefff@gmail.com>

References

[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.

See Also

ssa20, fssa30, fssi20, fssi30, fssa2d, fssa3d

Examples

1
2
3
4
5
x <- y <- seq(33)
image(x, y, rfq <- fssa20(n=200, p=c(.3,.4,.75,.5)), cex.main=1,
main="Frequencies of anisotropic (1,0)-clusters")
contour(x, y, rfq, levels=seq(.2,.3,.05), add=TRUE)
abline(h=17, lty=2); abline(v=17, lty=2)

SPSL documentation built on May 2, 2019, 12:34 p.m.