> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface ICompareData

Namespace: [OpenTD.Results.Dataset](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset)\
Assembly: OpenTD.Results.dll

Represents an algorithm for comparing all data of a single DataSubtype (T, TL, etc.) between two datasets.
Objects that implement this interface can be used within Comparer.ComparisonMethods
or Comparer.DefaultComparisonMethod. See PercentDifferenceCompareData for an example
implementation.

```csharp theme={null}
public interface ICompareData
```

## Properties

### ComparerInput

The Comparer will send data from the datasets through this member.

```csharp theme={null}
IComparerInput ComparerInput { get; set; }
```

#### Property Value

[IComparerInput](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.IComparerInput.md)

### ComparerOutput

Send output from the comparison to the Comparer through this member.

```csharp theme={null}
IComparerOutput ComparerOutput { get; set; }
```

#### Property Value

[IComparerOutput](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.IComparerOutput.md)

## Methods

### Compare(string, DataSubtype, IEnumerable\<string>, IEnumerable\<long>, IEnumerable\<long>, bool)

This method implements the comparison algorithm.

```csharp theme={null}
void Compare(string name, DataSubtype subtype, IEnumerable<string> commonNames, IEnumerable<long> commonIndicesA, IEnumerable<long> commonIndicesB, bool msgOnSuccess = true)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

This is a descriptive name for the data being compared. Use it in ComparerOutput messages.

`subtype` [DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataSubtype.md)

This is the type of data (T, TL, etc.) to compare.

`commonNames` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[string](https://learn.microsoft.com/dotnet/api/system.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](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[long](https://learn.microsoft.com/dotnet/api/system.int64)>

These are the internal indices to the commonNames list for Dataset A.

`commonIndicesB` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[long](https://learn.microsoft.com/dotnet/api/system.int64)>

These are the internal indices to the commonNames list for Dataset B.

`msgOnSuccess` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

If true, use ComparerOutput to write a message if this comparison is successful.

## See Also

[Comparer](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.Comparer.md),
[DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataSubtype.md),
[ICompareData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.ICompareData.md),
[PercentDifferenceCompareData](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.PercentDifferenceCompareData.md)
