OpenTD.Results.Dataset.FormulaDataArray Class Reference
Last update: 16.07.2025A DerivedDataArray that generate values using a formula that references 0 or more arrays from its InputCollection. More...

Public Member Functions | |
| FormulaDataArray (DataArrayCollection inputCollection) | |
| FormulaDataArray () | |
| override List< double > | GetValues (UnitsData units) |
| Gets the data in the units provided. | |
| List< double > | GetValues () |
| Gets the data in the current WorkingUnits. | |
| virtual void | SetValues (IEnumerable< double > values, DataSubtype subtype=null, UnitsData units=null, ItemIdentifier item=null) |
| override string | ToString () |
| IEnumerator< double > | GetEnumerator () |
Static Public Member Functions | |
| static implicit | operator List< double > (DataArray x) |
| static implicit | operator List< DataArray > (DataArray x) |
Protected Member Functions | |
| override string | GetSelfSuggestedName () |
| override void | SetDerivedData () |
| For setting ValuesSI, any other derived data. | |
| override void | CheckData () |
| virtual string | GetSelfSuggestedComment () |
Protected Attributes | |
| List< double > | ValuesSI |
Properties | |
| string | Formula [get, set] |
| The formula to generate array values. Use "X0" to refer to the first array in the InputCollection, "X1" to refer to the second, etc. For formula syntax, see .NET docs for DataColumn.Expression. (https://docs.microsoft.com/en-us/dotnet/api/system.data.datacolumn.expression?view=netcore-3.1) | |
| UnitsData | FormulaUnits [get, set] |
| The units the forumla is written in, if applicable. The FormulaDataArray will automatically convert the InputCollection to these units before applying the formula. This is necessary for a formula like "X0 + 30", for example, when X0 is a temperature and 30 is in deg C. Defaults to the WorkingUnits. | |
| override DataSubtype | Subtype [get, set] |
| The subtype of the formula result. Defaults to dimensionless, but can be set by the user. | |
| int | OutputCount [get, set] |
| The number of items contained in the output array. This defaults to the maximum Count of any input array (if there are input arrays) or to 1 if there are no input arrays. This value can be set by the user. | |
| DataArrayCollection | InputCollection [get, set] |
| The collection of DataArrays operated upon to derive data. | |
| bool | IgnoreNaNInCalculations [get, set] |
| override IDataset | SourceDataset [get, set] |
| The source Dataset for the InputCollection. | |
| override ItemIdentifier | SourceItem [get, set] |
| The SourceItem for the InputCollection. | |
| override int | Count [get] |
| override double | this[int index] [get, set] |
| DataItemIdentifier | SourceDataItem [get] |
| Combines the SourceItem and Subtype. If either are null, this is null. | |
| UnitsData.UnitsType | Dimension [get] |
| The physical dimension of this data. | |
| bool | IsInteger [get] |
| Returns true if the subtype of this data represents integer data. | |
| AutoNamer | AutoNamer [get, set] |
| string | Name [get, set] |
| string | InternalSuggestedName [get, set] |
| AutoCommenter | AutoCommenter [get, set] |
| string | Comment [get, set] |
| string | InternalSuggestedComment [get, set] |
Detailed Description
A DerivedDataArray that generate values using a formula that references 0 or more arrays from its InputCollection.
Constructor & Destructor Documentation
◆ FormulaDataArray() [1/2]
|
inline |
◆ FormulaDataArray() [2/2]
|
inline |
Member Function Documentation
◆ CheckData()
|
inlineprotectedvirtual |
Reimplemented from OpenTD.Results.Dataset.DerivedDataArray.
◆ GetEnumerator()
|
inlineinherited |
◆ GetSelfSuggestedComment()
|
inlineprotectedvirtualinherited |
◆ GetSelfSuggestedName()
|
inlineprotectedvirtual |
Reimplemented from OpenTD.Results.Dataset.DerivedDataArray.
◆ GetValues() [1/2]
|
inlineinherited |
Gets the data in the current WorkingUnits.
- Returns
- List<System.Double>.
- See also
- OpenTD.Units.WorkingUnits
◆ GetValues() [2/2]
|
inlinevirtualinherited |
Gets the data in the units provided.
- Parameters
-
units The units to return the data in.
- Returns
- List<System.Double>.
Reimplemented from OpenTD.Results.Dataset.DataArray.
Reimplemented in OpenTD.Results.Dataset.SelectOneDataArray.
◆ operator List< DataArray >()
|
inlinestaticinherited |
◆ operator List< double >()
|
inlinestaticinherited |
◆ SetDerivedData()
|
inlineprotectedvirtual |
For setting ValuesSI, any other derived data.
Reimplemented from OpenTD.Results.Dataset.DerivedDataArray.
◆ SetValues()
|
inlinevirtualinherited |
◆ ToString()
|
inlineinherited |
Member Data Documentation
◆ ValuesSI
|
protectedinherited |
Property Documentation
◆ AutoCommenter
|
getsetprotectedinherited |
◆ AutoNamer
|
getsetprotectedinherited |
◆ Comment
|
getsetinherited |
Implements OpenTD.Results.Dataset.IAutoComment.
◆ Count
|
getinherited |
◆ Dimension
|
getinherited |
The physical dimension of this data.
◆ Formula
|
getset |
The formula to generate array values. Use "X0" to refer to the first array in the InputCollection, "X1" to refer to the second, etc. For formula syntax, see .NET docs for DataColumn.Expression. (https://docs.microsoft.com/en-us/dotnet/api/system.data.datacolumn.expression?view=netcore-3.1)
◆ FormulaUnits
|
getset |
The units the forumla is written in, if applicable. The FormulaDataArray will automatically convert the InputCollection to these units before applying the formula. This is necessary for a formula like "X0 + 30", for example, when X0 is a temperature and 30 is in deg C. Defaults to the WorkingUnits.
◆ IgnoreNaNInCalculations
|
getsetinherited |
◆ InputCollection
|
getsetinherited |
The collection of DataArrays operated upon to derive data.
The input collection.
◆ InternalSuggestedComment
|
getsetinherited |
Implements OpenTD.Results.Dataset.IAutoComment.
◆ InternalSuggestedName
|
getsetinherited |
Implements OpenTD.Results.Dataset.IAutoName.
◆ IsInteger
|
getinherited |
Returns true if the subtype of this data represents integer data.
◆ Name
|
getsetinherited |
Implements OpenTD.Results.Dataset.IAutoName.
◆ OutputCount
|
getset |
The number of items contained in the output array. This defaults to the maximum Count of any input array (if there are input arrays) or to 1 if there are no input arrays. This value can be set by the user.
◆ SourceDataItem
|
getinherited |
Combines the SourceItem and Subtype. If either are null, this is null.
◆ SourceDataset
|
getsetinherited |
The source Dataset for the InputCollection.
The source dataset.
- Exceptions
-
OpenTDException Cannot set DerivedDataArray.SourceDataset directly. It will be derived from InputArrays.
◆ SourceItem
|
getsetinherited |
The SourceItem for the InputCollection.
The source item.
- Exceptions
-
OpenTDException Cannot set DerivedDataArray.SourceItem directly. It will be derived from InputArrays.
◆ Subtype
|
getset |
The subtype of the formula result. Defaults to dimensionless, but can be set by the user.
◆ this[int index]
|
getsetinherited |
The documentation for this class was generated from the following file:
- C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/TDDEV_ALPHA/buildXX/OpenTD.Results/Dataset/FormulaDataArray.cs