Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
get_lookup_table_value [2016/05/07 18:01] hermann [Notes] |
get_lookup_table_value [2026/08/28 03:20] (current) hermann Sync from local documentation review |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Get Lookup Table Value ====== | + | ====== Get Lookup Table Value ====== |
| ===== Description ===== | ===== Description ===== | ||
| - | This functor retrieves a value from a lookup table at a specified key. | + | Retrieves the value corresponding to a specified key from a lookup table. |
| ===== Inputs ===== | ===== Inputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ | + | ^ Name ^ Type ^ Description ^ |
| - | | Lookup table | [[Lookup table Type]] | Any lookup table. | | + | | Table | [[Lookup Table Type]] | Lookup table to search. | |
| - | | Key | [[Real Value Type]] | Row key. | | + | | Key | [[Real Value Type]] | Key to search for in Table. | |
| ===== Optional Inputs ===== | ===== Optional Inputs ===== | ||
| - | ^ Name ^ Type ^ Description ^ Default Value ^ | + | ^ Name ^ Type ^ Description ^ Default Value ^ |
| - | | Value If Not Found | [[Real Value Type]] | Value returned in case the key is not found. | None | | + | | Value If Not Found | [[Real Value Type]] | Value returned if Key is not present in Table. If not provided, an error is reported when the key is not found. This is an advanced port. | .none | |
| ===== Outputs ===== | ===== Outputs ===== | ||
| ^ Name ^ Type ^ Description ^ | ^ Name ^ Type ^ Description ^ | ||
| - | | Value | [[Real Value Type]] | The value corresponding to the given key. | | + | | Value | [[Real Value Type]] | Value corresponding to the given key. | |
| ===== Group ===== | ===== Group ===== | ||
| - | [[Functor List#Table | Table]] | + | [[Functor List#Lookup Table | Lookup Table]] |
| ===== Notes ===== | ===== Notes ===== | ||
| - | This searches for a value associated with a given key. If an exact match is not found, the result will depend on how the input port "Value If Not Found" is defined. If a default value is defined by this port, that value will be returned. Otherwise, the execution will an error and the model execution will be interrupted. | + | If Key is not found in Table and Value If Not Found is not provided, this functor reports an error, interrupting the model's execution. |
| + | |||
| + | To find an approximate match, or to interpolate between neighboring keys, instead use a [[Calculate Value]], [[Calculate Map]], [[Calculate Categorical Map]], or [[Calculate Lookup Table]] with one of the Lookup Table Operators described in the Image Expression Type documentation. | ||
| - | It is also possible to search for an approximate match using a [[Calculate Value]], [[Calculate Map]], [[Calculate Categorical Map]] or [[Calculate Lookup Table]]. See the "Lookup Table Operators" description on the [[http://csr.ufmg.br/dinamica/dokuwiki/doku.php?id=image_expression_type#operators|Image Expression Type]] documentation. | + | ===== Internal Name ===== |
| - | ===== Internal Name ===== | + | |
| GetLookupTableValue | GetLookupTableValue | ||