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
Last revision Both sides next revision
select_sub_table [2013/08/09 19:50]
admin [Description]
select_sub_table [2015/10/12 00:26]
admin
Line 9: Line 9:
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Input Table  | [[Table Type|Map]]  | The table containing the sub-tables corresponding to steps. ​ | +| Input Table  | [[Table Type]] ​ | The table containing the sub-tables corresponding to steps. ​ | 
-| Step  | [[Double ​Type|Double]]  | The input step.  |+| Step  | [[Real Value Type]] ​ | The input step.  |
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Result ​ | [[Table Type|Table]]  | The resulting sub-table. ​ |+| Result ​ | [[Table Type]] ​ | The resulting sub-table. ​ |
  
 ===== Group ===== ===== Group =====
Line 24: Line 24:
 ===== Notes ===== ===== Notes =====
  
-This submodel is similar to functor [[Get Table From Key]], except that if a key is not found, it retrieves the sub-table corresponding to the greatest key smaller than the given step. This is the same behavior ​found in operators ​like [[Select Lookup Table]] and [[Select Transition Matrix]]. Thus, the use of this submodel is advised as a better ​replacement ​to the Select ​family ​of functors.+This submodel is similar to functor [[Get Table From Key]], except that if a key is not found, it retrieves the sub-table corresponding to the greatest key smaller than the given step. This is the same behavior ​adopted by functors ​like [[Select Lookup Table]] and [[Select Transition Matrix]]. Thus, the use of this submodel is advised as a suitable ​replacement ​for that functor ​family. 
 + 
 +The differences between Select Sub Table and [[Get Table From Key]] can be seen below: 
 + 
 +^ Key1*  ^ Key2*  ^ Value1 ​ ^ Value2 ​ ^ 
 +|@lightyellow:​ 1  |@yellow: 12  |@yellow: "​bbbb" ​ |@yellow: 23  | 
 +|@lightgreen:​ 5  |@green: 12  |@green: "​cccc" ​ |@green: 23  | 
 +|@lightgreen:​ 5  |@green: 11  |@green: "​bbbb" ​ |@green: 14  | 
 +| 12  | 22  | "​aaaa" ​ | 23  | 
 + 
 +Retrieving the sub-table corresponding to Key1 5 returns the following table for both operators:​ 
 + 
 +^ Key2*  ^ Value1 ​ ^ Value2 ​ ^ 
 +|@green: 12  |@green: "​cccc" ​ |@green: 23  | 
 +|@green: 11  |@green: "​bbbb" ​ |@green: 14  | 
 + 
 +However, retrieving the sub-table corresponding to Key1 4 fails for [[Get Table From Key]], but returns  
 + 
 +^ Key2*  ^ Value1 ​ ^ Value2 ​ ^ 
 +|@yellow: 12  |@yellow: "​bbbb" ​ |@yellow: 23  |
  
 ===== Internal Name ===== ===== Internal Name =====
  
-GetTableValue+SelectSubTable