{"id":17153141,"url":"https://github.com/axect/rugfield","last_synced_at":"2025-10-17T11:47:00.095Z","repository":{"id":228485794,"uuid":"774140396","full_name":"Axect/Rugfield","owner":"Axect","description":"Rust Gaussian Random Field","archived":false,"fork":false,"pushed_at":"2024-06-21T06:52:16.000Z","size":2105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T03:44:23.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Axect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T02:26:15.000Z","updated_at":"2024-05-15T08:05:40.000Z","dependencies_parsed_at":"2024-03-19T02:39:49.751Z","dependency_job_id":"14ac6a02-8558-4765-81ef-c73de110c5ab","html_url":"https://github.com/Axect/Rugfield","commit_stats":null,"previous_names":["axect/rugfield"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FRugfield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FRugfield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FRugfield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axect%2FRugfield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Axect","download_url":"https://codeload.github.com/Axect/Rugfield/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239007225,"owners_count":19566990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T21:45:23.835Z","updated_at":"2025-10-17T11:46:59.998Z","avatar_url":"https://github.com/Axect.png","language":"Rust","readme":"# Rugfield\n\nRugfield is a Rust library for generating Gaussian Random Fields (GRFs) using the circulant embedding method. It provides an efficient and easy-to-use implementation for simulating GRFs with various kernel functions.\n\n## Features\n\n- Generate GRFs using the circulant embedding method\n- Support for various kernels.\n  - `SquaredExponential`\n  - `Matern`\n  - `LocalPeriodic`\n  - `RationalQuadratic`\n- Efficient computation using the `rustfft` library\n- Optional serialization support with the `serde` feature\n\n## Installation\n\nAdd the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nrugfield = \"0.2.2\"\n```\n\n## Usage\n\nHere's a simple example of how to use Rugfield to generate a GRF with a squared exponential kernel:\n\n```rust\nuse rugfield::{grf, Kernel};\n\nfn main() {\n    let n = 100;\n    let kernel = Kernel::SquaredExponential(0.1);\n    let grf_data = grf(n, kernel);\n\n    // Plot the GRF data\n    // ...\n}\n```\n\nThis code generates a GRF with a squared exponential kernel and a length scale of 0.1. The resulting GRF data is stored in the `grf_data` vector.\n\nFor a complete example, see the `examples/squared_exponential.rs` file:\n\n```rust\nuse peroxide::fuga::*;\nuse rugfield::{grf, Kernel::SquaredExponential};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    let x_max = 100.0;\n    let x_min = 0.0;\n    let sigma = 0.1;\n    let n = 1000;\n    let samples = 8;\n    let kernel = SquaredExponential(sigma);\n    let x = linspace_with_precision(x_min, x_max, n, 2);\n    let grfs = (0..samples).map(|_| grf(n, kernel)).collect::\u003cVec\u003c_\u003e\u003e();\n\n    // Plot the GRF data\n    // ...\n\n    Ok(())\n}\n```\n\nWith a specific random number generator:\n\n```rust\nuse peroxide::fuga::*;\nuse rugfield::{grf_with_rng, Kernel::SquaredExponential};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    let n = 100;\n    let kernel = SquaredExponential(0.1);\n    let mut rng = stdrng_from_seed(42);\n    let grf_data = grf_with_rng(\u0026mut rng, n, kernel);\n    // ...\n}\n```\n\nThe above code generates multiple GRFs with a squared exponential kernel and plots the resulting data. Here's an example output:\n\n![Squared Exponential GRF](examples/assets/squared_exponential_test.png)\n\n## Documentation\n\nFor detailed documentation and API reference, please refer to the [Rustdoc documentation](https://docs.rs/rugfield).\n\n## License\n\nRugfield is licensed under the [MIT License](LICENSE).\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/Axect/rugfield).\n\n## Acknowledgments\n\nRugfield was inspired by the paper \"An Effective Method for Simulating Gaussian Random Fields\" by Grace Chan (1999).\nWe would like to express our gratitude to the authors of the `rustfft` library for their excellent work, which has been instrumental in the development of Rugfield.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Frugfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxect%2Frugfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxect%2Frugfield/lists"}