Skip to content

Commit aeaf212

Browse files
committed
Swift 5 fix
1 parent bf59f4e commit aeaf212

File tree

11 files changed

+19
-23
lines changed

11 files changed

+19
-23
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Contributions to the project will be measured not only by their functional aspec
1010

1111
## Installation
1212

13-
**The project requires Xcode 9 and Swift 4.**
13+
**The project requires Xcode 10.2 and Swift 5.**
1414

1515
### Manual
1616

@@ -39,7 +39,7 @@ Chapter 7 of [Classic Computer Science Problems in Swift](https://github.com/dav
3939

4040
## License, Contributions, and Attributions
4141

42-
SwiftSimpleNeuralNetwork is Copyright 2016 David Kopec and licensed under the Apache License 2.0 (see LICENSE). As per the Apache license, contributions are also Apache licensed by default. And contributions are welcome!
42+
SwiftSimpleNeuralNetwork is Copyright 2016-2019 David Kopec and licensed under the Apache License 2.0 (see LICENSE). As per the Apache license, contributions are also Apache licensed by default. And contributions are welcome!
4343

4444
The wine and iris datasets in the unit tests are provided curtosy of the UCI Machine Learning Repository which should be cited as:
4545
> Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Sources/BiasNeuron.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SwiftSimpleNeuralNetwork
44
//
55
// Created by David Kopec on 3/13/18.
6-
// Copyright © 2018 Oak Snow Consulting. All rights reserved.
6+
// Copyright © 2018-2019 Oak Snow Consulting. All rights reserved.
77
//
88

99
import Foundation

Sources/Functions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Functions.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

Sources/Layer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Layer.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

Sources/Network.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Network.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

Sources/Neuron.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Neuron.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

SwiftSimpleNeuralNetwork.xcodeproj/project.pbxproj

+8-12
Original file line numberDiff line numberDiff line change
@@ -196,26 +196,26 @@
196196
isa = PBXProject;
197197
attributes = {
198198
LastSwiftUpdateCheck = 0800;
199-
LastUpgradeCheck = 0940;
199+
LastUpgradeCheck = 1020;
200200
ORGANIZATIONNAME = "Oak Snow Consulting";
201201
TargetAttributes = {
202202
550F28A91D0C966300B11A8F = {
203203
CreatedOnToolsVersion = 7.3.1;
204-
LastSwiftMigration = 0900;
204+
LastSwiftMigration = 1020;
205205
};
206206
555015B51D224DCB004D3F18 = {
207207
CreatedOnToolsVersion = 8.0;
208208
DevelopmentTeam = 59VX8JQ7R6;
209209
DevelopmentTeamName = "David Kopec";
210-
LastSwiftMigration = 0900;
210+
LastSwiftMigration = 1020;
211211
ProvisioningStyle = Automatic;
212212
TestTargetID = 550F28A91D0C966300B11A8F;
213213
};
214214
};
215215
};
216216
buildConfigurationList = 550F28A51D0C966300B11A8F /* Build configuration list for PBXProject "SwiftSimpleNeuralNetwork" */;
217217
compatibilityVersion = "Xcode 3.2";
218-
developmentRegion = English;
218+
developmentRegion = en;
219219
hasScannedForEncodings = 0;
220220
knownRegions = (
221221
en,
@@ -419,8 +419,7 @@
419419
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
420420
PRODUCT_BUNDLE_IDENTIFIER = com.oaksnow.SwiftSimpleNeuralNetwork;
421421
PRODUCT_NAME = "$(TARGET_NAME)";
422-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
423-
SWIFT_VERSION = 4.0;
422+
SWIFT_VERSION = 5.0;
424423
};
425424
name = Debug;
426425
};
@@ -434,8 +433,7 @@
434433
PRODUCT_BUNDLE_IDENTIFIER = com.oaksnow.SwiftSimpleNeuralNetwork;
435434
PRODUCT_NAME = "$(TARGET_NAME)";
436435
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
437-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
438-
SWIFT_VERSION = 4.0;
436+
SWIFT_VERSION = 5.0;
439437
};
440438
name = Release;
441439
};
@@ -450,8 +448,7 @@
450448
PRODUCT_BUNDLE_IDENTIFIER = com.oaksnow.SwiftSimpleNeuralNetworkTests;
451449
PRODUCT_NAME = "$(TARGET_NAME)";
452450
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
453-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
454-
SWIFT_VERSION = 4.0;
451+
SWIFT_VERSION = 5.0;
455452
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftSimpleNeuralNetwork.app/Contents/MacOS/SwiftSimpleNeuralNetwork";
456453
};
457454
name = Debug;
@@ -467,8 +464,7 @@
467464
PRODUCT_BUNDLE_IDENTIFIER = com.oaksnow.SwiftSimpleNeuralNetworkTests;
468465
PRODUCT_NAME = "$(TARGET_NAME)";
469466
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
470-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
471-
SWIFT_VERSION = 4.0;
467+
SWIFT_VERSION = 5.0;
472468
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftSimpleNeuralNetwork.app/Contents/MacOS/SwiftSimpleNeuralNetwork";
473469
};
474470
name = Release;

SwiftSimpleNeuralNetwork/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
255255

256256
// helper function finds the highest in an Array of Double and returns its index
257257
func interpretOutput(output: [Double]) -> Int {
258-
return output.index(of: output.max()!)!
258+
return output.firstIndex(of: output.max()!)!
259259
}
260260

261261
@IBAction func batchSizeChanged(sender: NSStepper) {

SwiftSimpleNeuralNetworkTests/IrisTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// IrisTest.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

SwiftSimpleNeuralNetworkTests/SinTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SwiftSimpleNeuralNetworkTests.swift
33
// SwiftSimpleNeuralNetworkTests
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

SwiftSimpleNeuralNetworkTests/WineTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// WineTest.swift
33
// SwiftSimpleNeuralNetwork
44
//
5-
// Copyright 2016 David Kopec
5+
// Copyright 2016-2019 David Kopec
66
//
77
// Licensed under the Apache License, Version 2.0 (the "License");
88
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)