Skip to content

Commit d6099b3

Browse files
committed
[Swift 4.2] Dijkstra Algorithm
1 parent f08d5fc commit d6099b3

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Dijkstra Algorithm/Dijkstra.playground/Contents.swift

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
//: Playground - noun: a place where people can play
22
import Foundation
33

4-
// last checked with Xcode 9.0b4
5-
#if swift(>=4.0)
6-
print("Hello, Swift 4!")
7-
#endif
8-
94
var vertices: Set<Vertex> = Set()
105

116
func createNotConnectedVertices() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Dijkstra Algorithm/VisualizedDijkstra.playground/Contents.swift

-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
import UIKit
1010
import PlaygroundSupport
1111

12-
// last checked with Xcode 9.0b4
13-
#if swift(>=4.0)
14-
print("Hello, Swift 4!")
15-
#endif
16-
1712
/*:
1813
First of all, let's set up colors for our window and graph. The visited color will be applied to visited vertices. The checking color will be applied to an edge and an edge neighbor every time the algorithm is checking some vertex neighbors. And default colors are just initial colors for elements.
1914
*/

Dijkstra Algorithm/VisualizedDijkstra.playground/Sources/Window.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public class Window: UIView, GraphDelegate {
134134
let origin = CGPoint(x: center.x - 25, y: 100)
135135
let activityIndicatorFrame = CGRect(origin: origin, size: size)
136136
activityIndicator = UIActivityIndicatorView(frame: activityIndicatorFrame)
137-
activityIndicator.activityIndicatorViewStyle = .whiteLarge
137+
activityIndicator.style = .whiteLarge
138138
}
139139

140140
@objc private func createGraphButtonTap() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)