Method CompareHashes
CompareHashes<TOldValue, TOldGetter, TNewValue, TNewGetter>(int, void*, int, void*, int*, int*, out int, out int)
Compare hashes of two collections and provide
a list of indices removeIndices to remove in oldHashes
and a list of indices addIndices to add in newHashes.
Assumes that newHashes and oldHashes are sorted.
Declaration
public static int CompareHashes<TOldValue, TOldGetter, TNewValue, TNewGetter>(int oldHashCount, void* oldHashes, int newHashCount, void* newHashes, int* addIndices, int* removeIndices, out int addCount, out int remCount) where TOldValue : struct where TOldGetter : struct, CoreUnsafeUtils.IKeyGetter<TOldValue, Hash128> where TNewValue : struct where TNewGetter : struct, CoreUnsafeUtils.IKeyGetter<TNewValue, Hash128>
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldHashCount | Number of hashes in |
| void* | oldHashes | Previous hashes to compare. |
| int | newHashCount | Number of hashes in |
| void* | newHashes | New hashes to compare. |
| int* | addIndices | Indices of element to add in |
| int* | removeIndices | Indices of element to remove in |
| int | addCount | Number of elements to add will be written here. |
| int | remCount | Number of elements to remove will be written here. |
Returns
| Type | Description |
|---|---|
| int | The number of operation to perform ( )
|
Type Parameters
| Name | Description |
|---|---|
| TOldValue | Old value type. |
| TOldGetter | Old getter type. |
| TNewValue | New value type. |
| TNewGetter | New getter type. |
CompareHashes(int, Hash128*, int, Hash128*, int*, int*, out int, out int)
Compare hashes.
Declaration
public static int CompareHashes(int oldHashCount, Hash128* oldHashes, int newHashCount, Hash128* newHashes, int* addIndices, int* removeIndices, out int addCount, out int remCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldHashCount | Number of hashes in |
| Hash128* | oldHashes | Previous hashes to compare. |
| int | newHashCount | Number of hashes in |
| Hash128* | newHashes | New hashes to compare. |
| int* | addIndices | Indices of element to add in |
| int* | removeIndices | Indices of element to remove in |
| int | addCount | Number of elements to add will be written here. |
| int | remCount | Number of elements to remove will be written here. |
Returns
| Type | Description |
|---|---|
| int | The number of operation to perform ( )
|