Assembly: OpenTD.Results.dll This ICompareData implementation compares data of a single subtype (T, TL, etc.) for all applicable common entities (nodes or lumps or… etc.) between two datasets by examining the percent difference between pairs of values at each record for each common-named entity. For this comparison, Datasets must have the same number of records.
Inheritance
object ← CompareData ← PercentDifferenceCompareDataImplements
ICompareDataInherited Members
CompareData.ComparerInput, CompareData.ComparerOutput, CompareData.Compare(string, DataSubtype, IEnumerable<string>, IEnumerable<long>, IEnumerable<long>, bool), object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Constructors
PercentDifferenceCompareData(IComparerInput, IComparerOutput)
Parameters
comparerInput IComparerInput
comparerOutput IComparerOutput
Properties
Floor
Comparison floor for comparing doubles. If the absolute value of a datapoint in dataset A is less than this value, the percent difference for that comparison is set to zero, resulting in that comparison being ignored. All comparisons are in SI units, so set the floor in SI units. Defaults to 0.Property Value
doublePercentTol
Percent tolerance to use when comparing doubles. Defaults to 1.0.Property Value
doubleMethods
Compare(string, DataSubtype, IEnumerable<string>, IEnumerable<long>, IEnumerable<long>, bool)
This method implements the comparison algorithm.Parameters
name string
This is a descriptive name for the data being compared. Use it in ComparerOutput messages.
subtype DataSubtype
This is the type of data (T, TL, etc.) to compare.
commonNames IEnumerable<string>
This is a list of Sinda names (MAIN.1, WALL.100, etc.) of entities that hold
data of subtype and are common to both datasets. For example, if subtype is
PL, then commonNames would be names of lumps that are common between the
datasets. The comparison should be performed over all of the items in this
list.
commonIndicesA IEnumerable<long>
These are the internal indices to the commonNames list for Dataset A.
commonIndicesB IEnumerable<long>
These are the internal indices to the commonNames list for Dataset B.
msgOnSuccess bool
If true, use ComparerOutput to write a message if this comparison is successful.