Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5CBD3200C6C for ; Thu, 30 Mar 2017 19:59:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5B6BE160BA1; Thu, 30 Mar 2017 17:59:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13EC8160BA7 for ; Thu, 30 Mar 2017 19:59:57 +0200 (CEST) Received: (qmail 75996 invoked by uid 500); 30 Mar 2017 17:59:57 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 75291 invoked by uid 99); 30 Mar 2017 17:59:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2017 17:59:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 88308E0F98; Thu, 30 Mar 2017 17:59:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Thu, 30 Mar 2017 18:00:09 -0000 Message-Id: <19f55311599f4442be9673845f27bd82@git.apache.org> In-Reply-To: <7bf010e5f2ed4d0894637666d0575d94@git.apache.org> References: <7bf010e5f2ed4d0894637666d0575d94@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [14/50] lucenenet git commit: Lucene.Net.Core.Util.Automaton: Replaced ValueHashSet with EquatableSet archived-at: Thu, 30 Mar 2017 17:59:59 -0000 Lucene.Net.Core.Util.Automaton: Replaced ValueHashSet with EquatableSet Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/46418a44 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/46418a44 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/46418a44 Branch: refs/heads/api-work Commit: 46418a44901ecc09626db0119cb6a9a64ec48969 Parents: 8801245 Author: Shad Storhaug Authored: Wed Mar 29 21:36:45 2017 +0700 Committer: Shad Storhaug Committed: Thu Mar 30 09:12:30 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs | 8 ++++---- src/Lucene.Net.Core/Util/Automaton/RegExp.cs | 2 +- src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs | 8 ++++---- .../Util/Automaton/AutomatonTestUtil.cs | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46418a44/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs b/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs index 1350478..579845f 100644 --- a/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs +++ b/src/Lucene.Net.Core/Util/Automaton/MinimizationOperations.cs @@ -81,7 +81,7 @@ namespace Lucene.Net.Util.Automaton State[] states = a.GetNumberedStates(); int sigmaLen = sigma.Length, statesLen = states.Length; List[,] reverse = new List[statesLen, sigmaLen]; - HashSet[] partition = new ValueHashSet[statesLen]; + ISet[] partition = new EquatableSet[statesLen]; List[] splitblock = new List[statesLen]; int[] block = new int[statesLen]; StateList[,] active = new StateList[statesLen, sigmaLen]; @@ -92,7 +92,7 @@ namespace Lucene.Net.Util.Automaton for (int q = 0; q < statesLen; q++) { splitblock[q] = new List(); - partition[q] = new ValueHashSet(); + partition[q] = new EquatableSet(); for (int x = 0; x < sigmaLen; x++) { active[q, x] = new StateList(); @@ -175,8 +175,8 @@ namespace Lucene.Net.Util.Automaton List sb = splitblock[j]; if (sb.Count < partition[j].Count) { - HashSet b1 = partition[j]; - HashSet b2 = partition[k]; + ISet b1 = partition[j]; + ISet b2 = partition[k]; foreach (State s in sb) { b1.Remove(s); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46418a44/src/Lucene.Net.Core/Util/Automaton/RegExp.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Util/Automaton/RegExp.cs b/src/Lucene.Net.Core/Util/Automaton/RegExp.cs index 87be9eb..1bfe383 100644 --- a/src/Lucene.Net.Core/Util/Automaton/RegExp.cs +++ b/src/Lucene.Net.Core/Util/Automaton/RegExp.cs @@ -758,7 +758,7 @@ namespace Lucene.Net.Util.Automaton /// public virtual ISet GetIdentifiers() { - HashSet set = new ValueHashSet(); + ISet set = new EquatableSet(); GetIdentifiers(set); return set; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46418a44/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs index 8fad6e6..7dfffe9 100644 --- a/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs +++ b/src/Lucene.Net.Core/Util/Automaton/SpecialOperations.cs @@ -236,9 +236,9 @@ namespace Lucene.Net.Util.Automaton { a.ExpandSingleton(); // reverse all edges - Dictionary> m = new Dictionary>(); + Dictionary> m = new Dictionary>(); State[] states = a.GetNumberedStates(); - HashSet accept = new ValueHashSet(); + ISet accept = new EquatableSet(); foreach (State s in states) { if (s.Accept) @@ -248,7 +248,7 @@ namespace Lucene.Net.Util.Automaton } foreach (State r in states) { - m[r] = new ValueHashSet(); + m[r] = new EquatableSet(); r.accept = false; } foreach (State r in states) @@ -260,7 +260,7 @@ namespace Lucene.Net.Util.Automaton } foreach (State r in states) { - HashSet tr = m[r]; + ISet tr = m[r]; r.SetTransitions(tr.ToArray(/*new Transition[tr.Count]*/)); } // make new initial+final states http://git-wip-us.apache.org/repos/asf/lucenenet/blob/46418a44/src/Lucene.Net.TestFramework/Util/Automaton/AutomatonTestUtil.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.TestFramework/Util/Automaton/AutomatonTestUtil.cs b/src/Lucene.Net.TestFramework/Util/Automaton/AutomatonTestUtil.cs index 47385b3..6440283 100644 --- a/src/Lucene.Net.TestFramework/Util/Automaton/AutomatonTestUtil.cs +++ b/src/Lucene.Net.TestFramework/Util/Automaton/AutomatonTestUtil.cs @@ -455,7 +455,7 @@ namespace Lucene.Net.Util.Automaton { return; } - HashSet initialset = new ValueHashSet(); + ISet initialset = new EquatableSet(); initialset.Add(a.initial); DeterminizeSimple(a, initialset); } @@ -490,7 +490,7 @@ namespace Lucene.Net.Util.Automaton } for (int n = 0; n < points.Length; n++) { - ISet p = new ValueHashSet(); + ISet p = new EquatableSet(); foreach (State q in s) { foreach (Transition t in q.GetTransitions())