Learn R Programming

mrf2d (version 0.3)

mrfi: Creation of mrfi objects.

Description

mrfi() creates an object of class mrfi based on a distance rule and optionally a list of relative positions. The argument max_norm and norm_type can be used to automatically include all positions within a "range" defined by the norm type chosen and distance using that norm.

A list of relative positions may also be included to specify sparse interaction structures, for example.

Usage

mrfi(max_norm = 1, norm_type = "1", positions = NULL)

Arguments

max_norm

a numeric value. All points with norm \(\le\) max_dist are included.

norm_type

a character indicating the norm type used. Possible values are "m", "1", "2", etc. See norm for details.

positions

a list of numeric vectors of length 2. Each vector corresponds to a relative position included.

Value

A mrfi object.

See Also

A paper with detailed description of the package can be found at https://arxiv.org/abs/2006.00383

Examples

Run this code
# NOT RUN {
mrfi(1)
mrfi(2)
mrfi(2, norm_type = "m")
mrfi(1, positions = list(c(4,4), c(-4,4)))

#Repeated positions are handled automatically
mrfi(1, positions = list(c(1,0), c(2,0)))

# }

Run the code above in your browser using DataLab