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
calc_histogram [2011/03/13 20:19]
hermann [Calc Histogram]
calc_histogram [2026/08/28 03:11] (current)
hermann Sync from local documentation review
Line 3: Line 3:
 ===== Description ===== ===== Description =====
  
-This functor calculates ​a histogram from a map.+Calculates ​a histogram from a map.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type               ​^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Map  | [[Map Type | Map]]  | Any map     ​|+| Map  | [[Map Type]] ​ | Any map.  ​|
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name           ​^ Type                    ^ Description ​                                                                            ​^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Interval Width | [[Double ​Type | Double]] | The width of the histogram interval. ​                                                   | 1.0           +| Interval Width  | [[Real Value Type]] ​ Width of each histogram interval ​(bin) | 1  
-| Cumulative ​    ​| [[Bool Type | Bool]]     ​| If true, the calculated histogram is cumulative. ​                                       False         +| Cumulative ​ | [[Boolean Value Type]] ​ | If true, the calculated histogram is cumulative. ​ No  ​
-| Relative ​      ​| [[Bool Type | Bool]]     ​| If true, the values in the histogram are normalized by the total number of occurrences. | False         |+| Relative ​ | [[Boolean Value Type]] ​ | If true, the values in the histogram are normalized by the total number of occurrences. ​ No  ​|
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name      ^ Type                                ^ Description ​              ​+^ Name  ^ Type  ^ Description ​ 
-| Histogram | [[Lookup Table Type | Lookup Table ]] | The calculated histogram. |+| Histogram ​ | [[Lookup Table Type]] ​ | The calculated histogram. ​ |
  
 ===== Group ===== ===== Group =====
  
-Statistics+[[Functor List#Statistics ​| Statistics]] 
 + 
 +===== Notes ===== 
 + 
 +Only the map's first layer is used to build the histogram. 
 + 
 +Each key in the output table is the lower bound of an interval, obtained by rounding the corresponding cell value down to the nearest multiple of Interval Width; the associated value is the count of cells falling in that interval (or, if Relative is true, that count divided by the total number of non-null cells). Because of this rounding, the lowest and highest keys in the resulting table can fall outside the range of values actually present in Map. 
 + 
 +Setting both Cumulative and Relative produces a histogram of cumulative relative frequencies. 
 + 
 +Raises an error if Interval Width is not greater than 0.
  
 ===== Internal Name ===== ===== Internal Name =====