Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
region_manager [2011/07/31 19:58]
hermann [Description]
region_manager [2026/08/28 03:31] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Region Manager ====== ​+====== Region Manager ======
  
 ===== Description ===== ===== Description =====
  
-This container ​creates and manages regions identified by a categorical mapwhose classes ​represent ​regions. +This container ​builds a region manager from a categorical map whose classes ​identify ​regions, and makes it available to the functors nested inside itThe region manager splits ​global ​map into the map of each region, and merges ​regional maps back together into global mapso each region can be processed independently. Unlike [[For Each Region]], this container does not iterate over the regions — it runs its contents once, with the region manager available to whichever region-aware functors are nested inside, directly or through ​[[Region]].
- +
-It manages both processes of splitting ​a map into several maps, each one comprising a region, and the subsequent merging of all regional maps in mosaicthat is new map.+
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Regions ​ | [[Categorical Map Type|Categorical Map]]  | Map of subregions, ​e.g, countries, states, counties, etc.  |+| Regions ​ | [[Categorical Map Type]] ​ | Map of subregions, ​such as countries, states, ​or counties. The cells that make up a region do not need to be contiguous.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-Region Cell Type  | [[Cell Type Type|Cell ​Type]] ​ | Data cell type for the mask map of region ​internally stored.  | Unsigned 1 Bit Integer ​ |+Border Cells  | [[Non Negative Integer Value Type]] ​ | Number ​of lines and columns added as an extra border around each region ​in its regional maps.  | 0  | 
 + 
 +===== Outputs ===== 
 + 
 +None. 
 + 
 +===== Internal Outputs ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ ^ 
 +| Region Manager ​ | [[Region Manager Type]] ​ | The region manager holding the regions. ​ |
  
 ===== Group ===== ===== Group =====
Line 21: Line 28:
 [[Functor List#Region | Region]] [[Functor List#Region | Region]]
  
-===== Notes ===== +===== Notes =====
  
-Since a Boolean representation ​is used as a mask for a region, it is advised to use "Unsigned 1 Bit Integer" ​as the cell type for the region mask map.+When Border Cells is greater than zero, the bounds of each region ​are increased by "2 * Border Cells" ​lines and columns.
  
-===== Internal Name ===== +Every [[Merge Regional Maps]] or [[Merge Regional Categorical Maps]] that reads from this container'​s region manager must have a matching [[Regional Map]] or [[Regional Categorical Map]] registering a map under the same name in that same region manager — otherwise the model reports an error. The reverse also holds: a [[Regional Map]] or [[Regional Categorical Map]] with no matching merge functor is reported with a warning, since it registers a map that nothing reads back. Registering two maps under the same name for the same region manager is likewise reported with a warning. 
 + 
 +See Lesson 14, "Using For Each Category and Region Manager,"​ for a worked example of this container. 
 + 
 +===== Internal Name =====
  
 RegionManager RegionManager
 +
 +===== Usage examples =====
 +
 +See practical examples of this functor in [[lesson_14|Lesson 14: Using For Each Category and Region Manager]]