Skip to content

Commit 0b2b8b3

Browse files
committed
rm unneccessary usings
1 parent c046953 commit 0b2b8b3

File tree

119 files changed

+284
-315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+284
-315
lines changed

src/Advanced.Algorithms/Binary/BaseConversion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Text;
33

44
namespace Advanced.Algorithms.Binary
5-
{
5+
{
66
/// <summary>
77
/// Base conversion implementation.
88
/// </summary>

src/Advanced.Algorithms/Compression/HuffmanCoding.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System;
1+
using Advanced.Algorithms.DataStructures;
2+
using System;
23
using System.Collections.Generic;
3-
using Advanced.Algorithms.DataStructures;
44

55
namespace Advanced.Algorithms.Compression
66
{
@@ -53,7 +53,7 @@ public Dictionary<T, byte[]> Compress(T[] input)
5353
/// </summary>
5454
private void dfs(FrequencyWrap currentNode, List<byte> pathStack, Dictionary<T, byte[]> result)
5555
{
56-
if(currentNode.IsLeaf)
56+
if (currentNode.IsLeaf)
5757
{
5858
result.Add(currentNode.Item, pathStack.ToArray());
5959
return;
@@ -114,7 +114,7 @@ public FrequencyWrap(T item, int frequency)
114114

115115
public int CompareTo(object obj)
116116
{
117-
return Frequency.CompareTo(((FrequencyWrap) obj).Frequency);
117+
return Frequency.CompareTo(((FrequencyWrap)obj).Frequency);
118118
}
119119
}
120120

src/Advanced.Algorithms/DataStructures/Dictionary/Dictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Advanced.Algorithms.DataStructures.Foundation
99
/// </summary>
1010
/// <typeparam name="K">The key datatype.</typeparam>
1111
/// <typeparam name="V">The value datatype.</typeparam>
12-
public class Dictionary<K, V> : IEnumerable<KeyValuePair<K, V>>
12+
public class Dictionary<K, V> : IEnumerable<KeyValuePair<K, V>>
1313
{
1414
private readonly IDictionary<K, V> dictionary;
1515

src/Advanced.Algorithms/DataStructures/Dictionary/OpenAddressDictionary.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Advanced.Algorithms.DataStructures.Foundation
66
{
7-
internal class OpenAddressDictionary<TK, TV> : IDictionary<TK, TV>
7+
internal class OpenAddressDictionary<TK, TV> : IDictionary<TK, TV>
88
{
99
private DictionaryKeyValuePair<TK, TV>[] hashArray;
1010
private int bucketSize => hashArray.Length;
@@ -368,7 +368,7 @@ internal DictionaryKeyValuePair(K key, V value)
368368
}
369369
}
370370

371-
internal class OpenAddressDictionaryEnumerator<TK, TV> : IEnumerator<KeyValuePair<TK, TV>>
371+
internal class OpenAddressDictionaryEnumerator<TK, TV> : IEnumerator<KeyValuePair<TK, TV>>
372372
{
373373
internal DictionaryKeyValuePair<TK, TV>[] HashArray;
374374

src/Advanced.Algorithms/DataStructures/Dictionary/SeparateChainingDictionary.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Advanced.Algorithms.DataStructures.Foundation
66
{
7-
internal class SeparateChainingDictionary<K, V> : IDictionary<K, V>
7+
internal class SeparateChainingDictionary<K, V> : IDictionary<K, V>
88
{
99
private const double tolerance = 0.1;
1010

@@ -15,7 +15,7 @@ internal class SeparateChainingDictionary<K, V> : IDictionary<K, V>
1515

1616
public int Count { get; private set; }
1717

18-
18+
1919
public SeparateChainingDictionary(int initialBucketSize = 3)
2020
{
2121
this.initialBucketSize = initialBucketSize;
@@ -301,7 +301,7 @@ public IEnumerator<KeyValuePair<K, V>> GetEnumerator()
301301

302302
}
303303

304-
internal class SeparateChainingDictionaryEnumerator<TK, TV> : IEnumerator<KeyValuePair<TK, TV>>
304+
internal class SeparateChainingDictionaryEnumerator<TK, TV> : IEnumerator<KeyValuePair<TK, TV>>
305305
{
306306
internal DoublyLinkedList<KeyValuePair<TK, TV>>[] HashList;
307307

src/Advanced.Algorithms/DataStructures/Graph/AdjacencyMatrix/WeightedGraph.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class WeightedGraph<T, TW> : IGraph<T>, IEnumerable<T> where TW : ICompar
2222
private Dictionary<T, WeightedGraphVertex<T, TW>> vertexObjects;
2323

2424
public int VerticesCount => usedSize;
25-
public bool IsWeightedGraph => true;
25+
public bool IsWeightedGraph => true;
2626

2727
public WeightedGraph()
2828
{
@@ -203,7 +203,7 @@ public bool HasEdge(T source, T dest)
203203
return false;
204204
}
205205

206-
public IEnumerable<KeyValuePair<T,TW>> Edges(T vertex)
206+
public IEnumerable<KeyValuePair<T, TW>> Edges(T vertex)
207207
{
208208
if (!vertexIndices.ContainsKey(vertex))
209209
{
@@ -214,7 +214,7 @@ public IEnumerable<KeyValuePair<T,TW>> Edges(T vertex)
214214

215215
for (int i = 0; i < maxSize; i++)
216216
{
217-
if (!matrix[i,index].Equals(default(TW)))
217+
if (!matrix[i, index].Equals(default(TW)))
218218
{
219219
yield return new KeyValuePair<T, TW>(reverseVertexIndices[i], matrix[i, index]);
220220
}
@@ -302,7 +302,7 @@ private void halfMatrixSize()
302302
{
303303
for (int j = i; j < maxSize; j++)
304304
{
305-
if (!matrix[i, j].Equals(default(TW)) && !matrix[j,i].Equals(default(TW))
305+
if (!matrix[i, j].Equals(default(TW)) && !matrix[j, i].Equals(default(TW))
306306
&& reverseVertexIndices.ContainsKey(i)
307307
&& reverseVertexIndices.ContainsKey(j))
308308
{
@@ -320,7 +320,7 @@ private void halfMatrixSize()
320320
reverseVertexIndices = newReverseIndices;
321321
}
322322

323-
public IEnumerable<IGraphVertex<T>> VerticesAsEnumberable => vertexObjects.Select(x=>x.Value);
323+
public IEnumerable<IGraphVertex<T>> VerticesAsEnumberable => vertexObjects.Select(x => x.Value);
324324

325325
IEnumerator IEnumerable.GetEnumerator()
326326
{

src/Advanced.Algorithms/DataStructures/Graph/IDiGraph.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Advanced.Algorithms.DataStructures.Graph
77
/// Directed graph.
88
/// </summary>
99
/// <typeparam name="T"></typeparam>
10-
public interface IDiGraph<T>
10+
public interface IDiGraph<T>
1111
{
1212
bool IsWeightedGraph { get; }
1313

@@ -19,7 +19,7 @@ public interface IDiGraph<T>
1919

2020
bool HasEdge(T source, T destination);
2121

22-
IDiGraph<T> Clone();
22+
IDiGraph<T> Clone();
2323
}
2424

2525
public interface IDiGraphVertex<T>

src/Advanced.Algorithms/DataStructures/Graph/IGraph.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
63

74
namespace Advanced.Algorithms.DataStructures.Graph
85
{

src/Advanced.Algorithms/DataStructures/HashSet/HashSet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Advanced.Algorithms.DataStructures.Foundation
88
/// A hash table implementation.
99
/// </summary>
1010
/// <typeparam name="T">The value datatype.</typeparam>
11-
public class HashSet<T> : IEnumerable<T>
11+
public class HashSet<T> : IEnumerable<T>
1212
{
1313
private readonly IHashSet<T> hashSet;
1414

src/Advanced.Algorithms/DataStructures/HashSet/OpenAddressHashSet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
namespace Advanced.Algorithms.DataStructures.Foundation
66
{
7-
internal class OpenAddressHashSet<T> : IHashSet<T>
7+
internal class OpenAddressHashSet<T> : IHashSet<T>
88
{
99
private HashSetNode<T>[] hashArray;
1010
private int bucketSize => hashArray.Length;
1111
private readonly int initialBucketSize;
1212

1313
public int Count { get; private set; }
14-
14+
1515
internal OpenAddressHashSet(int initialBucketSize = 2)
1616
{
1717
this.initialBucketSize = initialBucketSize;
@@ -281,7 +281,7 @@ internal HashSetNode(T value)
281281
}
282282
}
283283

284-
internal class OpenAddressHashSetEnumerator<V> : IEnumerator<V>
284+
internal class OpenAddressHashSetEnumerator<V> : IEnumerator<V>
285285
{
286286
internal HashSetNode<V>[] hashArray;
287287

0 commit comments

Comments
 (0)