Skip to content

Commit 4294221

Browse files
committed
private case
1 parent 20bac61 commit 4294221

File tree

8 files changed

+21
-22
lines changed

8 files changed

+21
-22
lines changed

src/Advanced.Algorithms/Binary/BaseConversion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static string Convert(string srcNumber,
2828
var fraction = tmp[1].TrimStart();
2929

3030
return convertWhole(whole, srcBaseChars, dstBaseChars) +
31-
"." + ConvertFraction(fraction, srcBaseChars, dstBaseChars, precision);
31+
"." + convertFraction(fraction, srcBaseChars, dstBaseChars, precision);
3232
}
3333

3434
return convertWhole(srcNumber, srcBaseChars, dstBaseChars);
@@ -86,7 +86,7 @@ private static string convertWhole(string srcNumber,
8686
/// <summary>
8787
/// Converts the fractional part of source number.
8888
/// </summary>
89-
private static string ConvertFraction(string srcNumber,
89+
private static string convertFraction(string srcNumber,
9090
string srcBaseChars,
9191
string dstBaseChars, int maxPrecision)
9292
{

src/Advanced.Algorithms/DataStructures/Heap/FibonacciHeap.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public T Extract()
7474
deleteNode(ref heapForestHead, minMaxNode);
7575

7676
mergeForests(minMaxNode.ChildrenHead);
77-
Meld();
77+
meld();
7878

7979
Count--;
8080

@@ -167,7 +167,7 @@ public T Peek()
167167
/// <summary>
168168
/// Merge roots with same degrees in Forest.
169169
/// </summary>
170-
private void Meld()
170+
private void meld()
171171
{
172172

173173
if (heapForestHead == null)

src/Advanced.Algorithms/DataStructures/Heap/d-aryHeap.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void bulkInit(T[] initial)
6666

6767
while (i >= 0)
6868
{
69-
BulkInitRecursive(i, initial);
69+
bulkInitRecursive(i, initial);
7070
i--;
7171
}
7272

@@ -76,7 +76,7 @@ private void bulkInit(T[] initial)
7676
/// <summary>
7777
/// Recursively load bulk init values.
7878
/// </summary>
79-
private void BulkInitRecursive(int i, T[] initial)
79+
private void bulkInitRecursive(int i, T[] initial)
8080
{
8181
while (true)
8282
{

src/Advanced.Algorithms/DataStructures/Set/DisJointSet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public T FindSet(T member)
5454
throw new Exception("No such set with given member.");
5555
}
5656

57-
return FindSet(set[member]).Data;
57+
return findSet(set[member]).Data;
5858
}
5959

6060
/// <summary>
@@ -63,14 +63,14 @@ public T FindSet(T member)
6363
/// Does path Compression on all visited members on way to root
6464
/// by pointing their parent to Root.
6565
/// </summary>
66-
private DisJointSetNode<T> FindSet(DisJointSetNode<T> node)
66+
private DisJointSetNode<T> findSet(DisJointSetNode<T> node)
6767
{
6868
var parent = node.Parent;
6969

7070
if(node !=parent)
7171
{
7272
//compress path by setting parent to Root
73-
node.Parent = FindSet(node.Parent);
73+
node.Parent = findSet(node.Parent);
7474
return node.Parent;
7575
}
7676

src/Advanced.Algorithms/DataStructures/Tree/BinaryTree.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public bool HasItem(T value)
3333
/// </summary>
3434
public int GetHeight()
3535
{
36-
return GetHeight(root);
36+
return getHeight(root);
3737
}
3838

3939
/// <summary>
@@ -175,14 +175,14 @@ public IEnumerable<T> Children(T value)
175175
return null;
176176
}
177177

178-
private int GetHeight(BinaryTreeNode<T> node)
178+
private int getHeight(BinaryTreeNode<T> node)
179179
{
180180
if (node == null)
181181
{
182182
return -1;
183183
}
184184

185-
return Math.Max(GetHeight(node.Left), GetHeight(node.Right)) + 1;
185+
return Math.Max(getHeight(node.Left), getHeight(node.Right)) + 1;
186186
}
187187

188188
private BinaryTreeNode<T> find(T value)

src/Advanced.Algorithms/DataStructures/Tree/IntervalTree.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void Delete(T[] start, T[] end)
9494
allOverlaps.Add(overlap.NextDimensionIntervals);
9595
}
9696

97-
DeleteOverlaps(allOverlaps, start, end, 1);
97+
deleteOverlaps(allOverlaps, start, end, 1);
9898
tree.Delete(new OneDimentionalInterval<T>(start[0], end[0], defaultValue));
9999

100100
items.Remove(new Tuple<T[], T[]>(start, end));
@@ -104,7 +104,7 @@ public void Delete(T[] start, T[] end)
104104
/// <summary>
105105
/// Recursively delete values from overlaps in next dimension.
106106
/// </summary>
107-
private void DeleteOverlaps(List<OneDimentionalIntervalTree<T>> currentTrees, T[] start, T[] end, int index)
107+
private void deleteOverlaps(List<OneDimentionalIntervalTree<T>> currentTrees, T[] start, T[] end, int index)
108108
{
109109
//base case
110110
if (index == start.Length)
@@ -123,7 +123,7 @@ private void DeleteOverlaps(List<OneDimentionalIntervalTree<T>> currentTrees, T[
123123
}
124124

125125
//dig in to next dimension to
126-
DeleteOverlaps(allOverlaps, start, end, ++index);
126+
deleteOverlaps(allOverlaps, start, end, ++index);
127127

128128
index--;
129129

src/Advanced.Algorithms/DataStructures/Tree/SplayTree.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ public bool HasItem(T value)
4545
/// </summary>
4646
internal int GetHeight()
4747
{
48-
return GetHeight(Root);
48+
return getHeight(Root);
4949
}
5050

51-
private int GetHeight(SplayTreeNode<T> node)
51+
private int getHeight(SplayTreeNode<T> node)
5252
{
5353
if (node == null)
5454
{
5555
return -1;
5656
}
5757

58-
return Math.Max(GetHeight(node.Left), GetHeight(node.Right)) + 1;
58+
return Math.Max(getHeight(node.Left), getHeight(node.Right)) + 1;
5959
}
6060

6161
/// <summary>
@@ -206,7 +206,7 @@ private void delete(SplayTreeNode<T> node, T value)
206206
//and then delete the left max node
207207
else
208208
{
209-
var maxLeftNode = FindMax(node.Left);
209+
var maxLeftNode = findMax(node.Left);
210210

211211
node.Value = maxLeftNode.Value;
212212

@@ -295,10 +295,10 @@ private void deleteLeftNode(SplayTreeNode<T> node)
295295
/// </summary>
296296
public T FindMax()
297297
{
298-
return FindMax(Root).Value;
298+
return findMax(Root).Value;
299299
}
300300

301-
private SplayTreeNode<T> FindMax(SplayTreeNode<T> node)
301+
private SplayTreeNode<T> findMax(SplayTreeNode<T> node)
302302
{
303303
while (true)
304304
{

src/Advanced.Algorithms/Graph/Sort/DepthFirstTopSort.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Advanced.Algorithms.DataStructures.Graph;
2-
using Advanced.Algorithms.DataStructures.Graph.AdjacencyList;
32
using System.Collections.Generic;
43

54
namespace Advanced.Algorithms.Graph

0 commit comments

Comments
 (0)