Skip to content

Commit 52b82d7

Browse files
committed
Fixed naming and documentation
1 parent 7413d36 commit 52b82d7

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

PriorityQueues/MappedPriorityQueue.cs renamed to PriorityQueues/BinaryHeapMappedPriorityQueue.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace PriorityQueues
77
{
8-
public class MappedPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
8+
public class BinaryHeapMappedPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
99
{
1010
#region Private fields
1111
private List<T> _heap;
@@ -20,31 +20,31 @@ public class MappedPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityEleme
2020

2121
#region Constructors
2222
/// <summary>
23-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that is empty and has the default initial capacity
23+
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that is empty and has the default initial capacity
2424
/// </summary>
25-
public MappedPriorityQueue()
25+
public BinaryHeapMappedPriorityQueue()
2626
{
2727
_heap = new List<T>();
2828

2929
_map = new Dictionary<T, List<int>>();
3030
}
3131

3232
/// <summary>
33-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that is empty and has the specified initial capacity
33+
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that is empty and has the specified initial capacity
3434
/// </summary>
35-
/// <param name="capacity">The number of elements the <see cref="PriorityQueue{T}"/> can initially store</param>
36-
public MappedPriorityQueue(int capacity)
35+
/// <param name="capacity">The number of elements the <see cref="BinaryHeapMappedPriorityQueue{T}"/> can initially store</param>
36+
public BinaryHeapMappedPriorityQueue(int capacity)
3737
{
3838
_heap = new List<T>(capacity);
3939

4040
_map = new Dictionary<T, List<int>>(capacity);
4141
}
4242

4343
/// <summary>
44-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
44+
/// Initializes a new instance of <see cref="BinaryHeapMappedPriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
4545
/// </summary>
46-
/// <param name="collection">The collection whose elements are copied to the <see cref="PriorityQueue{T}"/></param>
47-
public MappedPriorityQueue(IEnumerable<T> collection)
46+
/// <param name="collection">The collection whose elements are copied to the <see cref="BinaryHeapMappedPriorityQueue{T}"/></param>
47+
public BinaryHeapMappedPriorityQueue(IEnumerable<T> collection)
4848
{
4949
_heap = new List<T>(collection.Count());
5050

PriorityQueues/PriorityQueue.cs renamed to PriorityQueues/BinaryHeapPriorityQueue.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace PriorityQueues
77
{
8-
public class PriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
8+
public class BinaryHeapPriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
99
{
1010
#region Private fields
1111
private List<T> _heap;
@@ -18,27 +18,27 @@ public class PriorityQueue<T> : IPriorityQueue<T> where T : IPriorityElement
1818

1919
#region Constructors
2020
/// <summary>
21-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that is empty and has the default initial capacity
21+
/// Initializes a new instance of <see cref="BinaryHeapPriorityQueue{T}"/> class that is empty and has the default initial capacity
2222
/// </summary>
23-
public PriorityQueue()
23+
public BinaryHeapPriorityQueue()
2424
{
2525
_heap = new List<T>();
2626
}
2727

2828
/// <summary>
29-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that is empty and has the specified initial capacity
29+
/// Initializes a new instance of <see cref="BinaryHeapPriorityQueue{T}"/> class that is empty and has the specified initial capacity
3030
/// </summary>
31-
/// <param name="capacity">The number of elements the <see cref="PriorityQueue{T}"/> can initially store</param>
32-
public PriorityQueue(int capacity)
31+
/// <param name="capacity">The number of elements the <see cref="BinaryHeapPriorityQueue{T}"/> can initially store</param>
32+
public BinaryHeapPriorityQueue(int capacity)
3333
{
3434
_heap = new List<T>(capacity);
3535
}
3636

3737
/// <summary>
38-
/// Initializes a new instance of <see cref="PriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
38+
/// Initializes a new instance of <see cref="BinaryHeapPriorityQueue{T}"/> class that contains elements copied from the specified collection, sorted by their priority value
3939
/// </summary>
40-
/// <param name="collection">The collection whose elements are copied to the <see cref="PriorityQueue{T}"/></param>
41-
public PriorityQueue(IEnumerable<T> collection)
40+
/// <param name="collection">The collection whose elements are copied to the <see cref="BinaryHeapPriorityQueue{T}"/></param>
41+
public BinaryHeapPriorityQueue(IEnumerable<T> collection)
4242
{
4343
_heap = new List<T>(collection.Count());
4444

PriorityQueues/PriorityQueues.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
<ItemGroup>
4444
<Compile Include="IPriorityElement.cs" />
4545
<Compile Include="IPriorityQueue.cs" />
46-
<Compile Include="MappedPriorityQueue.cs" />
47-
<Compile Include="PriorityQueue.cs" />
46+
<Compile Include="BinaryHeapMappedPriorityQueue.cs" />
47+
<Compile Include="BinaryHeapPriorityQueue.cs" />
4848
<Compile Include="Properties\AssemblyInfo.cs" />
4949
</ItemGroup>
5050
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

0 commit comments

Comments
 (0)