Learn R Programming

isingLenzMC (version 0.2.8)

genConfig1D: Generate one dimensional spin sites randomly

Description

The function uses default RNG (Marsienne-Twister) unless changed by the user, within R, to generate a vector that contains 1 or -1. This reflects spin sites. This function calls 'genConfig1D' C function.

Usage

genConfig1D(n)

Value

Returns vector that contains 1s or -1s.

Arguments

n

The number of spin sites on the lattice.

Author

Mehmet Suzen <mehmet.suzen@physics.org>

Examples

Run this code
  n <- 10 # 10 spin sites
  genConfig1D(n)

Run the code above in your browser using DataLab