Assembly: OpenTD.Results.dll Use to compare two Datasets.
Inheritance
object ← ComparerImplements
IComparerInput, IComparerOutputInherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()Constructors
Comparer(IDataset, IDataset)
Initializes a new instance of the Comparer class.Parameters
a IDataset
Dataset A
b IDataset
Dataset B
Properties
CompareConductorNames
Determines whether Run() will compare the ID’s of conductors in common thermal submodels.Property Value
boolCompareFTieNames
Determines whether Run() will compare the ID’s of FTies in common fluid submodels.Property Value
boolCompareFluidSubmodels
Determines whether Run() will compare the names of the fluid submodels.Property Value
boolCompareIFaceNames
Determines whether Run() will compare the ID’s of IFaces in common fluid submodels.Property Value
boolCompareJustFinalRecord
Determines whether Run() will compare just the final data values in each dataset. If true, will also ignore differences in number of records and won’t compare times. Defaults to false.Property Value
boolCompareLumpNames
Determines whether Run() will compare the ID’s of lumps in common fluid submodels.Property Value
boolCompareNodeNames
Determines whether Run() will compare the ID’s of nodes in common thermal submodels.Property Value
boolComparePathNames
Determines whether Run() will compare the ID’s of paths in common fluid submodels.Property Value
boolCompareRecords
Determines whether Run() will compare the number of records.Property Value
boolCompareRegisterNames
Determines whether Run() will compare the names of registers.Property Value
boolCompareThermalSubmodels
Determines whether Run() will compare the names of the thermal submodels.Property Value
boolCompareTieNames
Determines whether Run() will compare the ID’s of ties in common fluid submodels.Property Value
boolCompareTimes
Determines whether Run() will compare the max and min times.Property Value
boolComparisonMethods
This dispatch table determines what comparison methods will be used for each StandardDataSubtype (T, TL, etc.). All others not listed will use the DefaultComparisonMethod algorithm.Property Value
Dictionary<StandardDataSubtypes, ICompareData>See Also
DataSubtype, Comparer.DefaultComparisonMethod, StandardDataSubtypesDataToCompare
List of FullStandardDataSubtype (T, TL, PL, etc.) to compare for all common-name entities. For example, if TL is in the list, then Run() will find all the lump names that are common between the two Datasets and compare all values of TL for all of them.Property Value
List<FullStandardDataSubtype>See Also
FullStandardDataSubtypeDatasetA
One of the datasets to compare.Property Value
IDatasetDatasetB
One of the datasets to compare.Property Value
IDatasetDefaultComparisonMethod
For StandardDataSubtypes (T, TL, etc.) not listed in the ComparisonMethods dispatch table, use this comparison algorithm.Property Value
ICompareDataSee Also
DataSubtype, Comparer.ComparisonMethods, StandardDataSubtypesExceedances
After calling Run(), contains information about data items that exceeded the allowable percent tolerance. Contains a dictionary with one entry for each FullStandardDataSubtype (T, TL, PL, etc.) tested. The entries are lists of all items that exceed the percent tolerance, in descending order by exceedance amount.Property Value
Dictionary<DataSubtype, List<Exceedance>>See Also
FullStandardDataSubtype, ExceedanceMessage
Run() outputs a report to this string.Property Value
stringRecNumsA
A list of the record numbers in DatasetA.Property Value
List<long>RecNumsB
A list of the record numbers in DatasetB.Property Value
List<long>RegisterDataToCompare
List of registers to compare, if common between datasets. If list is empty, will compare data for all common registers.Property Value
List<string>TimePercentTol
Tolerance for comparison of time series.Property Value
doubleTimesA
A list of the times in DatasetA.Property Value
List<double>TimesB
A list of the times in DatasetB.Property Value
List<double>Methods
CloseDatasets()
GetExceedancePlots(int, IEnumerable<DataSubtype>)
Parameters
maxPerSubtype int
subtypes IEnumerable<DataSubtype>
Returns
List<ExceedancePlot>PlotExceedances(int, IEnumerable<DataSubtype>)
Parameters
maxPerSubtype int
subtypes IEnumerable<DataSubtype>
Returns
List<ExceedancePlot>ReOpenDatasets()
Run()
Compares the datasets. Writes a report to the string Message. Returns true if the Datasets are found to be equal for all of the tests performed.Returns
booltrue if all tests performed indicate the Datasets are equal, false otherwise.
See Also
Comparer.MessageSaveExceedancePlots(string, out string, string, int, IEnumerable<DataSubtype>)
Parameters
directoryPath string
resultMsg string
prefix string
maxPerSubtype int
subtypes IEnumerable<DataSubtype>
Returns
boolToString()
Returns a string that represents the current object.Returns
string A string that represents the current object._markdiff(string)
Do not use.Parameters
msg string
_writeline(string)
Do not use.Parameters
msg string
_writesuccess(string)
Do not use.Parameters
msg string