| Title: | What the Package Does (Title Case) |
|---|---|
| Description: | More about what it does (maybe more than one line). Continuation lines should be indented. |
| Authors: | Jane Doe [aut, cre] |
| Maintainer: | Jane Doe <[email protected]> |
| License: | What license is it under? |
| Version: | 0.1.0 |
| Built: | 2026-07-14 04:41:18 UTC |
| Source: | https://github.com/UchidaMizuki/ndgras |
N-dimensional Generalized RAS (nD-GRAS) method
nd_gras( source, constraints, ..., tolerance = 1e-10, max_iterations = 1000, verbose = FALSE )nd_gras( source, constraints, ..., tolerance = 1e-10, max_iterations = 1000, verbose = FALSE )
source |
An array to be adjusted. |
constraints |
A list of constraints created by |
... |
Additional arguments (currently unused). |
tolerance |
A numeric value indicating the convergence tolerance. Default is |
max_iterations |
An integer indicating the maximum number of iterations. Default is |
verbose |
A logical value indicating whether to print progress messages. Default is |
A list containing the following components:
target |
The adjusted n-dimensional array. |
margins |
A list of margins used in the constraints. |
multipliers |
A list of multipliers for each constraint. |
iterations |
The number of iterations performed. |
max_change_multipliers |
The maximum absolute difference between multipliers of the last two iterations. |
converged |
A logical value indicating whether the algorithm converged. |
Create a constraint for the nD-GRAS method
nd_gras_constraint(margin, target)nd_gras_constraint(margin, target)
margin |
An integer vector indicating the dimensions to constrain. |
target |
An array (or vector) representing the target marginal sums. |
A list containing the margin and target.