示例#1
0
        public FactKey Merge(FactKey other)
        {
            if (_measurements.Count != other._measurements.Count)
            {
                throw new ArgumentException("Cannot merge keys with different measurement count.");
            }
            var mergedKey = new int[_measurements.Count];

            for (var dimensionIndex = 0; dimensionIndex < _measurements.Count; ++dimensionIndex)
            {
                mergedKey[dimensionIndex] = MergeMeasurements(_measurements[dimensionIndex], other._measurements[dimensionIndex]);
            }
            return(new FactKey(mergedKey));
        }
示例#2
0
 public bool Equals(FactKey other)
 {
     return(StructuralComparisons.StructuralEqualityComparer.Equals(_measurements, other._measurements));
 }