Commit Graph

117 Commits

Author SHA1 Message Date
Mattt de80b69526
Resolve SwiftLint Warnings (#167)
* Disable implicit_return rule

* Unescape slashes in file header pattern

Decrease indentation level for file header pattern

* Fix 'warning: Contains over first not nil Violation: Prefer `contains` over `first(where:) != nil` (contains_over_first_not_nil)'

* Fix 'warning: Mark Violation: MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)'
2020-05-12 07:44:58 -07:00
Vincent Esche d2318c4c34
Added functions for generating uniform/normal distributed randomness (#154)
Added functions for generating uniform/normal distributed randomness
2019-10-29 18:10:20 +01:00
Vincent Esche 2f35e09724 Added `var shape: Shape` to `Matrix<Scalar>` (with possible values `.tall`, `.wide`, `.square`) 2019-10-16 14:54:34 +02:00
Vincent Esche 46c7030c4d Fixed unit tests 2019-10-15 15:44:35 +02:00
Vincent Esche 3628056b3b Fixed typo in unit test 2019-10-10 23:04:07 +02:00
Vincent Esche d9a1652ec7 Refactored test fixtures to allow mapping to a range, rather than just scaling 2019-10-10 23:04:07 +02:00
Vincent Esche 4daa68a023 Added `…InPlace` variants for functions in ‘Auxiliary.swift’ and added missing unit tests 2019-10-10 23:04:07 +02:00
Vincent Esche a30b24ca18 Renamed `internal`-scoped `func modInPlace([_], [_])` to the more appropriate `elmodInPlace` 2019-10-10 22:51:38 +02:00
Vincent Esche 540307b52a Improved formatting
# Conflicts:
#	Sources/Surge/Linear Algebra/Matrix.swift
2019-10-05 16:41:22 +02:00
Vincent Esche 8fdbdf5cbf Fixed name misnamed test functions 2019-10-03 17:49:35 +02:00
Vincent Esche ba7acd70a7 Fixed typos in test fixture 2019-10-03 15:54:38 +02:00
Vincent Esche 254da517d9 Added closure-based initializer function for Vector and corresponding unit test 2019-10-03 12:59:09 +02:00
Vincent Esche 2d370f39de Added closure-based initializer function for Matrix and corresponding unit test 2019-10-03 12:59:09 +02:00
Vincent Esche eaac5da763 Added unit tests for ‘Statistics.swift’ 2019-10-02 01:31:29 +02:00
Vincent Esche a2149dee03 Improved tests for `Trigonometric.swifs` 2019-09-27 17:13:03 +02:00
Vincent Esche cdf7731530 Improved test fixtures 2019-09-27 17:13:03 +02:00
Vincent Esche 46563559a3 Improved test fixtures 2019-09-27 17:13:03 +02:00
Vincent Esche e9ab0ec813 Added benchmarks for functions in ‘Trigonometric.swift’ 2019-09-27 17:13:03 +02:00
Vincent Esche 05f5b667b4 Removed last stray `measure { … }` from ‘AuxiliaryTests.swift’ 2019-09-27 17:13:03 +02:00
Vincent Esche f743b0f2dd Merged ‘HyperbolicTests.swift’ into ‘TrigonometricTests.swift’ 2019-09-27 17:13:03 +02:00
Vincent Esche 3f2f221f3a Removed unnecessary explicit `Swift.` namespace prefix 2019-09-27 17:12:22 +02:00
Vincent Esche f2a6f0bed5 Improved vector tests; removed redundant benchmarks 2019-09-27 17:12:22 +02:00
Vincent Esche dc15bef919 Fixed renamed methods in ‘SurgeBenchmarkTests’ 2019-09-25 11:35:47 +02:00
Vincent Esche e5375a62be Bumped copyright from ‘… - 2018’ to ‘… - 2019’ 2019-09-25 11:16:35 +02:00
Vincent Esche 1f2093a189 Removed redundant unit tests from ‘VectorTests.swift’ 2019-09-25 10:15:26 +02:00
Vincent Esche 329207d0c0 Added missing `…InPlace` functions for `Vector<Scalar>` 2019-09-25 10:15:26 +02:00
Vincent Esche 5e9e974c5d Reduced sizes of testing vectors/matrices from 1000 to 100 2019-09-25 01:56:54 +02:00
Vincent Esche fa55e572fd Added benchmarks for `Vector<Scalar>` 2019-09-25 01:56:54 +02:00
Vincent Esche f05fa664d7 Further extended test/benchmark fixtures 2019-09-25 01:56:54 +02:00
Vincent Esche dcebafd1f3 Add `muladd…` to `Vector<Scalar>` and corresponding tests 2019-09-25 01:56:54 +02:00
Vincent Esche 462c1e40dc Improved test fixtures 2019-09-25 01:56:54 +02:00
Vincent Esche 2dd97c6308 Improved benchmark fixtures 2019-09-25 01:56:54 +02:00
Vincent Esche f22fdf5afb Removed redundancies from ‘SurgeTests/ArithmeticTests.swift’ 2019-09-25 01:56:54 +02:00
Vincent Esche c217280e14 Added benchmarks corresponding to those previously found in `SurgeTests/LogarithmTests.swift` 2019-09-25 01:56:54 +02:00
Vincent Esche 207fedc4bd Changed tests to only check each operation’s base function (e.g. `func logInPlace`), not a derived wrapper function (e.g. `func log`)
This also removed any previously added benchmarks. But not to worry we’ll add them back in a dedicated `SurgeBenchmarkTests` test target.
2019-09-25 01:56:54 +02:00
Vincent Esche 740dfa72d3 Removed redundant ‘ExponentialTests.swift’ file 2019-09-25 01:56:54 +02:00
Vincent Esche c41d6044f6 Added benchmarks corresponding to those previously found in `SurgeTests/ArithmeticTests.swift` 2019-09-25 01:56:54 +02:00
Vincent Esche 370b71514b Added ‘XCTestCase+Surge.swift’ with benchmarking helpers 2019-09-25 01:56:54 +02:00
Vincent Esche 7168c8ca2d Changed tests to only check each operation’s base function (e.g. `func addInPlace`), not a derived wrapper function (e.g. `func add` or `func +`, etc.)
This also removed any previously added benchmarks. But not to worry we’ll add them back in a dedicated `SurgeBenchmarkTests` test target.
2019-09-25 01:56:54 +02:00
Vincent Esche c8156f782c Fixed typo (`LofarithmTests` -> `LogarithmTests`) 2019-09-24 20:15:29 +02:00
Vincent Esche 7a2b3eb971 Added tests for `logb` 2019-09-24 20:15:29 +02:00
Vincent Esche 3da003bf4a Added tests for `log10` 2019-09-24 20:15:29 +02:00
Vincent Esche 055d1c3c7f Added tests for `log2` 2019-09-24 20:15:29 +02:00
Vincent Esche b9fbf3f730 Added tests for `log` 2019-09-24 20:15:29 +02:00
Vincent Esche ae6f5b21c1 Added ’LogarithmTests.swift’ file 2019-09-24 20:15:29 +02:00
Vincent Esche b590bc8ee6 Changed `distSq…` of ’Arithmetic.swift’ to be implemented in terms of `sum`, `sq` & `sub` with minimal temporary array allocations 2019-09-24 17:21:30 +02:00
Vincent Esche 1a198b0396 Added `sq` & `sqInPlace` to ‘Arithmetic.swift’ 2019-09-24 17:21:30 +02:00
Vincent Esche c351ba1884 Renamed `mulAdd…` to `muladd…` to match `elmul`, etc 2019-09-24 17:21:30 +02:00
Vincent Esche 46b1687a29 Added `mulAdd(Matrix, Matrix)` (multiply-add) and turned existing addition/subtraction into shallow wrappers around it 2019-09-24 17:21:30 +02:00
Vincent Esche 912854a747 Resolved FIXMEs, adding missing unit tests 2019-09-23 22:54:36 +02:00