Extracts structural metadata and 1D boundary start indices from a canonicalized locations table for consumption by Stan multi-layer models.
Arguments
- loc_info
A canonicalized locations table (passed to
canonicalize_locations()).
Value
A named list containing:
n_locs: integer total count of locationsn_layers: integer maximum depth / number of layers (>= 2)layer_starts: integer array of starting location indices for each layer (lengthn_layers)n_parent_locs: integer count of parent locations that have childrenparent_loc_id: integer array (lengthn_parent_locs) of canonical IDs of parent locationsparent_child_starts: integer array (lengthn_parent_locs) of starting child location IDsloc_population: numeric array (lengthn_locs) of population weights
