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
Next revision Both sides next revision
table_type [2013/08/05 14:57]
admin [Table Type]
table_type [2013/11/07 22:27]
admin
Line 3: Line 3:
 A table is a collection of [[wp>​Tuple|tuples]],​ where each tuple may be formed by several keys and values. The set of keys must be unique for each tuple. A table is a collection of [[wp>​Tuple|tuples]],​ where each tuple may be formed by several keys and values. The set of keys must be unique for each tuple.
  
-The set of all elements at the same position in all tuples defines a column. All columns must have a unique name. The names must follow the general convention ​of names in Dinamica EGO, they must start with a "​_"​ or a letter and must be formed by letters, numbers and underscores. Blanks in names are automatically replaced by "​_"​ (underscore).+[{{ :​editors:​table_basics_1.png?​nolink |Table Basics}}] 
 + 
 +[{{ :​editors:​table_basics_2.png?​nolink |Table Basics}}] 
 + 
 +The set of all elements at the same position in all tuples defines a column. All columns must have a unique name. The names must follow the general ​name convention in Dinamica EGO, they must start with a "​_"​ or a letter and must be formed by letters, numbers and underscores. Blanks in names are automatically replaced by "​_"​ (underscore).
  
 Keys and values can be represented using double precision [[wp>​Floating_point|floating point numbers]], allowing the definition of integral and fractional values, or [[wp>​String_(computer_science)|strings]]. ​ Keys and values can be represented using double precision [[wp>​Floating_point|floating point numbers]], allowing the definition of integral and fractional values, or [[wp>​String_(computer_science)|strings]]. ​
 +
 +Internally, tables are represented using trees.
 +
 +[{{ :​editors:​table_internals.png?​nolink |Table Internals}}]
  
 ===== GUI Editor ===== ===== GUI Editor =====
Line 25: Line 33:
 </​code>​ </​code>​
  
-The type of each columns is inferred ​by the column elements. Elements representing strings ​must be surrounded by double quotes "\""​.+The type of each columns is inferred ​inspecting ​the column elements. Elements representing strings ​can be surrounded by double quotes ​'"'.
  
 <code cpp> <code cpp>
Line 35: Line 43:
   12, "​sugar_cane",​ 75, 45, 123,   12, "​sugar_cane",​ 75, 45, 123,
   34, "​bean",​ 20, 45, 57,   34, "​bean",​ 20, 45, 57,
 +]
 +</​code>​
 +
 +The table below represents the table above without the use of double quotes.
 +
 +<code cpp>
 +[
 +  Categories*,​ Name, Color_Red, Color_Green,​ Color_Blue,
 +  1, soy, 20, 45, 125,
 +  2, rice, 20, 100, 125,
 +  7, coffee, 200, 45, 125,
 +  12, sugar_cane, 75, 45, 123,
 +  34, bean, 20, 45, 57,
 ] ]
 </​code>​ </​code>​
Line 46: Line 67:
 </​code>​ </​code>​
  
 +However, it is possible to omit the column type if the column type is "​Real"​. So, it is legal to redefine the previous table as the following:
 +
 +<code cpp>
 +[
 +  "​From*",​ "​To*",​ "​Variable_Name*#​string",​ "​Upper_Range*",​ "​Weight_Coefficient"​
 +]
 +</​code>​
 +
 +===== Automatic Conversions =====
 +
 +  * **Converted from**: [[Change Matrix Type]], [[Transition Matrix Type]], [[Transition Function Parameter Matrix Type]], [[Percent Matrix Type]], [[Categorization Type]] and [[Lookup Table Type]].
 +
 +  * **Converted to**: [[Change Matrix Type]], [[Transition Matrix Type]], [[Transition Function Parameter Matrix Type]], [[Percent Matrix Type]], [[Categorization Type]] and [[Lookup Table Type]].