Changeset 16273
- Timestamp:
- 11/04/18 10:56:46 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Hashing/HashExtensions.cs
r16272 r16273 82 82 var node = nodes[i]; 83 83 const int size = sizeof(ulong); 84 var hashes = new byte[(node.Arity + 1) * size]; 84 var hashes = new ulong[node.Arity + 1]; 85 var bytes = new byte[(node.Arity + 1) * size]; 85 86 86 87 for (int j = i - 1, k = 0; k < node.Arity; ++k, j -= 1 + nodes[j].Size) { 87 Array.Copy(BitConverter.GetBytes(nodes[j].CalculatedHashValue), 0, hashes, k * size, size); 88 } 89 Array.Copy(BitConverter.GetBytes(node.HashValue), 0, hashes, node.Arity * size, size); 90 return hashFunction(hashes); 88 hashes[k] = nodes[j].CalculatedHashValue; 89 } 90 hashes[node.Arity] = node.HashValue; 91 Buffer.BlockCopy(hashes, 0, bytes, 0, bytes.Length); 92 return hashFunction(bytes); 91 93 } 92 94
Note: See TracChangeset
for help on using the changeset viewer.