Skip to content

Commit

Permalink
[Swift 4.2] Dijkstra Algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
KelCodesStuff committed Oct 5, 2018
1 parent f08d5fc commit d6099b3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
5 changes: 0 additions & 5 deletions Dijkstra Algorithm/Dijkstra.playground/Contents.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
//: Playground - noun: a place where people can play
import Foundation

// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif

var vertices: Set<Vertex> = Set()

func createNotConnectedVertices() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
import UIKit
import PlaygroundSupport

// last checked with Xcode 9.0b4
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif

/*:
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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public class Window: UIView, GraphDelegate {
let origin = CGPoint(x: center.x - 25, y: 100)
let activityIndicatorFrame = CGRect(origin: origin, size: size)
activityIndicator = UIActivityIndicatorView(frame: activityIndicatorFrame)
activityIndicator.activityIndicatorViewStyle = .whiteLarge
activityIndicator.style = .whiteLarge
}

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

0 comments on commit d6099b3

Please sign in to comment.