internal void Add(RankDiff rankDiff) { lock (this.gate) { this.needsRefresh = true; this.KeyedDiffs[RankDiffKey] = rankDiff; } }
private static bool TryGetRankDiff(Array x, Array y, out RankDiff rankDiff) { if (x.Length != y.Length || x.Rank != y.Rank) { rankDiff = new RankDiff(x, y); return true; } for (var i = 0; i < x.Rank; i++) { if (x.GetLowerBound(i) != y.GetLowerBound(i) || x.GetUpperBound(i) != y.GetUpperBound(i)) { rankDiff = new RankDiff(x, y); return true; } } rankDiff = null; return false; }
private static bool TryGetRankDiff(Array x, Array y, out RankDiff rankDiff) { if (x.Length != y.Length || x.Rank != y.Rank) { rankDiff = new RankDiff(x, y); return(true); } for (var i = 0; i < x.Rank; i++) { if (x.GetLowerBound(i) != y.GetLowerBound(i) || x.GetUpperBound(i) != y.GetUpperBound(i)) { rankDiff = new RankDiff(x, y); return(true); } } rankDiff = null; return(false); }