Skip to content

alfredoalegria/FastSimNetworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Computationally Efficient Algorithms for Simulating Isotropic Gaussian Random Fields on Graphs with Euclidean Edges

CONTENTS:

The "basic_functions" folder contains R and C scripts to perform specific auxiliary tasks.

To compile the C code, use the terminal to navigate to your directory and enter 'R CMD SHLIB file_name.c'.

This process will produce a shared object file that can be dynamically linked to R.

  • basic_functions/empVariog.R: R functions to compute the sample variogram/madogram for a random field over a network.

  • basic_functions/functions.R: R functions to generate a grid over the network and to compute the Laplacian matrix.

  • basic_functions/plotSim.R: R function to plot the realization of the random field over the network.

  • basic_functions/c/BB.c: C function to simulate Brownian Bridges.

  • basic_functions/c/resitance_metric.c: C function to fill the covariance matrix in terms of the resistance metric.

  • basic_functions/r/BB.R: R function to simulate Brownian Bridges (this produces the interface between R and C).

  • basic_functions/r/resitance_metric.R: R function to fill the covariance matrix in terms of the resistance metric (this produces the interface between R and C).

The "sim_algorithms" folder contains R scripts where the simulation algorithms are implemented.

  • sim_algorithms/auxiliary_process.R: R function to simulate the auxiliary random field (described in Section 4.1).
  • sim_algorithms/SpectralSim.R: R function with Algorithm 1 (spectral algorithm described in Section 4.2).
  • sim_algorithms/Dilution1Sim.R: R function with Algorithm 2 (Poisson dilution described in Section 4.3).
  • sim_algorithms/Dilution2Sim.R: R function with Algorithm 3 (dilution of a random germ described in Section 4.4).

The "examples" folder contains R scripts to reproduce the studies described in the paper.

  • examples/realizations.R: R script producing realizations from each algorithm over the Chicago network (Figure 1).
  • examples/execTimes.R: R script that calculates the execution times for different sample sizes (Table 4).
  • examples/variograms.R: R script that performs statistical testing on the dependency structure reproduction (Table 5).
  • examples/normality.R: R script that assesses the accuracy of the central limit approximation (Figure 4).
  • examples/point_pattern.R: R script producing a realization of a log-Gaussian Cox process (Figure 5).
  • examples/delaunay.R: R script producing a realization of a random field over a Delaunay network (Figure 6).

About

Algorithms for Simulating Random Fields on Networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published