Skip to content

Commit 5be86f6

Browse files
authored
Merge pull request #16 from astares/15-Cleanup-unnecessary-tabs-spaces-and-final-dots
Cleanup unnecessary tabs, spaces and final dots
2 parents 7a6f0d1 + 847057e commit 5be86f6

33 files changed

+204
-209
lines changed

src/AI-Algorithms-Graph-Components/AIDisjointSetNode.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AIDisjointSetNode >> find [
3232

3333
"Compress the path leading back to the root.
3434
This is the path compression operation that gives the linear amortized time complexity"
35-
[ node = root ] whileFalse: [
35+
[ node = root ] whileFalse: [
3636
next := node parent.
3737
node parent: root.
3838
node := next ].

src/AI-Algorithms-Graph-Components/AIGraphEdge.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AIGraphEdge class >> with: aModel from: srcNode to: dstNode [
3535
edge model: aModel.
3636
edge from: srcNode.
3737
edge to: dstNode.
38-
^ edge.
38+
^ edge
3939
]
4040

4141
{ #category : #accessing }

src/AI-Algorithms-Graph-Components/AIReducedGraphNode.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AIReducedGraphNode >> printOn: stream [
3232

3333
stream nextPutAll: self label.
3434
model isCollection
35-
ifTrue: [
35+
ifTrue: [
3636
model
3737
do: [ :node | node printOn: stream ]
3838
separatedBy: [ stream << ', ' ] ]

src/AI-Algorithms-Graph-Generators/AI2DGridNode.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AI2DGridNode >> x [
1717
]
1818

1919
{ #category : #accessing }
20-
AI2DGridNode >> x: anInteger [
20+
AI2DGridNode >> x: anInteger [
2121
x := anInteger
2222
]
2323

@@ -27,6 +27,6 @@ AI2DGridNode >> y [
2727
]
2828

2929
{ #category : #accessing }
30-
AI2DGridNode >> y: anInteger [
30+
AI2DGridNode >> y: anInteger [
3131
y := anInteger
3232
]

src/AI-Algorithms-Graph-Generators/AIAlbertBarabasiGraphGenerator.class.st

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@ AIAlbertBarabasiGraphGenerator >> run [
2727

2828
self nodes: (1 to: m0).
2929
self nodes
30-
do: [ :n1 |
30+
do: [ :n1 |
3131
self nodes
32-
do: [ :n2 |
32+
do: [ :n2 |
3333
n1 ~= n2
34-
ifTrue: [
34+
ifTrue: [
3535
self
3636
addEdge:
3737
{(n1 model).
3838
(n2 model)}
3939
from: #first
40-
to: #second ] ] ].
41-
42-
40+
to: #second ] ] ]
4341
]

src/AI-Algorithms-Graph-Generators/AIAtlasGraphGenerator.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ AIAtlasGraphGenerator >> edgesArray: anArray [
159159
{ #category : #running }
160160
AIAtlasGraphGenerator >> run [
161161
edgesArray
162-
do: [ :edge |
162+
do: [ :edge |
163163
self
164164
addEdge:
165165
{edge first.

src/AI-Algorithms-Graph-Generators/AIErdosRenyiGNMGraphGenerator.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ AIErdosRenyiGNMGraphGenerator >> run [
2626
"https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model"
2727

2828
edgesNumber
29-
timesRepeat: [
29+
timesRepeat: [
3030
| source target |
3131
source := self nodes atRandom.
3232
target := ((self nodes copy)

src/AI-Algorithms-Graph-Generators/AIErdosRenyiGNPGraphGenerator.class.st

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ AIErdosRenyiGNPGraphGenerator >> run [
2525
"https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model"
2626

2727
self nodes
28-
do: [ :n1 |
28+
do: [ :n1 |
2929
self nodes
30-
do: [ :n2 |
30+
do: [ :n2 |
3131
n1 ~= n2
32-
ifTrue: [
32+
ifTrue: [
3333
100 atRandom / 100 < probability
34-
ifTrue: [
34+
ifTrue: [
3535
self
3636
addEdge:
3737
{n1 model.

src/AI-Algorithms-Graph-Generators/AIGrid2DGenerator.class.st

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Class {
1616
AIGrid2DGenerator >> buildMooreNeighborhood [
1717
| graph |
1818
graph := self nodes.
19-
2 to: width do: [ :i |
20-
2 to: height do: [ :j |
19+
2 to: width do: [ :i |
20+
2 to: height do: [ :j |
2121
self
2222
addEdge:
2323
{(graph at: (j - 1) * width + i) model.
@@ -38,7 +38,7 @@ AIGrid2DGenerator >> buildMooreNeighborhood [
3838
to: #second ] ].
3939

4040
"Link upper nodes"
41-
1 to: width - 1 do: [ :i |
41+
1 to: width - 1 do: [ :i |
4242
self
4343
addEdge:
4444
{(graph at: i) model.
@@ -47,15 +47,15 @@ AIGrid2DGenerator >> buildMooreNeighborhood [
4747
to: #second ].
4848

4949
"Link left nodes"
50-
1 to: height - 1 do: [ :i |
50+
1 to: height - 1 do: [ :i |
5151
self
5252
addEdge:
5353
{(graph at: (i - 1) * width + 1) model.
5454
(graph at: (i - 1) * width + 1 + width) model}
5555
from: #first
5656
to: #second ].
57-
1 to: width - 1 do: [ :i |
58-
2 to: height do: [ :j |
57+
1 to: width - 1 do: [ :i |
58+
2 to: height do: [ :j |
5959
self
6060
addEdge:
6161
{(graph at: (j - 1) * width + i) model.
@@ -68,8 +68,8 @@ AIGrid2DGenerator >> buildMooreNeighborhood [
6868
AIGrid2DGenerator >> buildVonNeumannNeighorhood [
6969
| graph |
7070
graph := self nodes.
71-
2 to: width do: [ :i |
72-
2 to: height do: [ :j |
71+
2 to: width do: [ :i |
72+
2 to: height do: [ :j |
7373
self
7474
addEdge:
7575
{(graph at: (j - 1) * width + i) model.
@@ -84,7 +84,7 @@ AIGrid2DGenerator >> buildVonNeumannNeighorhood [
8484
to: #second ] ].
8585

8686
"Link upper nodes"
87-
1 to: width - 1 do: [ :i |
87+
1 to: width - 1 do: [ :i |
8888
self
8989
addEdge:
9090
{(graph at: i) model.
@@ -93,7 +93,7 @@ AIGrid2DGenerator >> buildVonNeumannNeighorhood [
9393
to: #second ].
9494

9595
"Link left nodes"
96-
1 to: height - 1 do: [ :i |
96+
1 to: height - 1 do: [ :i |
9797
self
9898
addEdge:
9999
{(graph at: (i - 1) * width + 1) model.

src/AI-Algorithms-Graph-Generators/AIGrid3DGenerator.class.st

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Class {
1717
AIGrid3DGenerator >> buildVonNeumannNeighorhood [
1818
| graph |
1919
graph := self nodes.
20-
1 to: length - 1 do: [ :i |
21-
1 to: height - 1 do: [ :j |
22-
1 to: width - 1 do: [ :k |
20+
1 to: length - 1 do: [ :i |
21+
1 to: height - 1 do: [ :j |
22+
1 to: width - 1 do: [ :k |
2323
self
2424
addEdge:
2525
{(graph at: i + ((j - 1) * length) + ((k - 1) * length * height)) model.
@@ -40,8 +40,8 @@ AIGrid3DGenerator >> buildVonNeumannNeighorhood [
4040
to: #second ] ] ].
4141

4242
"Right plane"
43-
1 to: height - 1 do: [ :j |
44-
1 to: width - 1 do: [ :k |
43+
1 to: height - 1 do: [ :j |
44+
1 to: width - 1 do: [ :k |
4545
self
4646
addEdge:
4747
{(graph at: length + ((j - 1) * length) + ((k - 1) * length * height)) model.
@@ -56,8 +56,8 @@ AIGrid3DGenerator >> buildVonNeumannNeighorhood [
5656
to: #second ] ].
5757

5858
"Top plan"
59-
1 to: length - 1 do: [ :i |
60-
1 to: height - 1 do: [ :j |
59+
1 to: length - 1 do: [ :i |
60+
1 to: height - 1 do: [ :j |
6161
self
6262
addEdge:
6363
{(graph at: i + ((j - 1) * length) + ((width - 1) * length * height)) model.
@@ -71,8 +71,8 @@ AIGrid3DGenerator >> buildVonNeumannNeighorhood [
7171
from: #first
7272
to: #second ] ].
7373
"Back Plane"
74-
1 to: length - 1 do: [ :i |
75-
1 to: width - 1 do: [ :k |
74+
1 to: length - 1 do: [ :i |
75+
1 to: width - 1 do: [ :k |
7676
self
7777
addEdge:
7878
{(graph at: i + ((height - 1) * length) + ((k - 1) * length * height)) model.
@@ -87,15 +87,15 @@ AIGrid3DGenerator >> buildVonNeumannNeighorhood [
8787
to: #second ] ].
8888

8989
"Rigth Edge"
90-
1 to: width - 1 do: [ :k |
90+
1 to: width - 1 do: [ :k |
9191
self
9292
addEdge:
9393
{(graph at: length + ((height - 1) * length) + ((k - 1) * length * height)) model.
9494
(graph at: length + ((height - 1) * length) + (k * length * height)) model}
9595
from: #first
9696
to: #second ].
9797
"Top Edge"
98-
1 to: height - 1 do: [ :j |
98+
1 to: height - 1 do: [ :j |
9999
self
100100
addEdge:
101101
{(graph at: length + ((j - 1) * length) + ((width - 1) * length * height)) model.
@@ -104,7 +104,7 @@ AIGrid3DGenerator >> buildVonNeumannNeighorhood [
104104
to: #second ].
105105

106106
"Top Back Edge"
107-
1 to: length - 1 do: [ :i |
107+
1 to: length - 1 do: [ :i |
108108
self
109109
addEdge:
110110
{(graph at: i + ((height - 1) * length) + ((width - 1) * length * height)) model.

0 commit comments

Comments
 (0)