Commit Graph

63 Commits

Author SHA1 Message Date
Vincent Esche 59a14fdbd2 Moved `func test_mul_empty_float` and added corresponding `func test_mul_empty_double` 2019-09-23 22:54:36 +02:00
Vincent Esche 3e48656227 Moved functions with `Scalar` as `lhs` into separate `ScalarTests` file 2019-09-23 22:54:36 +02:00
Vincent Esche fbdfc14902 Added missing tests for dot product of `Vector<Scalar>` 2019-09-23 22:54:36 +02:00
Vincent Esche 5b86954a46 Added `// MARK: - …` to unit tests to improve ergonomics in Xcode’s minimaps 2019-09-23 22:54:36 +02:00
Vincent Esche d616943927 Added benchmark measurements to `VectorTests` 2019-09-23 22:54:36 +02:00
Vincent Esche 51f09e9f50 Increased size of too-small arrays in performance measurements 2019-09-23 22:54:36 +02:00
Vincent Esche 4ec96e4ff4 Removed test helper functions in favor of explicit literals. K.I.S.S. 2019-09-23 22:54:36 +02:00
Vincent Esche 898a908c35 Unified naming of `lhs` and `rhs` arguments (from current mix of `lhs`, `x`, `l`, …) 2019-08-30 13:48:34 +02:00
Vincent Esche 7f4543704f Replaced `// MARK:` with `// MARK: - ` for nicer visual separation in Xcode 2019-08-30 13:48:34 +02:00
Vincent Esche 8dc7cbc180 Replaced use of named functions in ‘ArithmeticTests.swift’ with operators
By the latter forward to the former we thus essentually test both code-paths in one test.
2019-08-30 13:48:34 +02:00
Vincent Esche 4bbef2dc49 Added unit tests for diagonal matrix initializers 2019-08-30 01:08:04 +02:00
Vincent Esche 0e7264bb45 Added missing `measure { … }` blocks in ‘ArithmeticTests.swift’ 2019-08-30 00:48:05 +02:00
Vincent Esche 747f5aaa50 Resolved merge conflict 2019-08-30 00:48:05 +02:00
Vincent Esche 84ec46895a Fix formatting 2019-08-30 00:48:05 +02:00
Vincent Esche 29ff1d8d53 Added unit tests & benchmarks for several arithmetic functions 2019-08-30 00:48:05 +02:00
Vincent Esche cc1a716740 Fixed unit tests for `Matrix.sum(_:axies:)` 2019-08-30 00:47:54 +02:00
Vincent Esche 51f9480325 Added missing unit tests for matrix initializers 2019-08-30 00:47:54 +02:00
Vincent Esche fd0a10dd8a Moved computed test values into local `let actual` binding 2019-08-30 00:47:54 +02:00
Vincent Esche 2be03f3e08 Removed unused test function 2019-08-30 00:47:54 +02:00
Vincent Esche 28d7ea00c4 Fixed failing unit test due to large float and resulting decreased accuracy 2019-08-30 00:47:54 +02:00
Vincent Esche a71761df7e Fixed swiftlint violations 2019-08-30 00:47:54 +02:00
Vincent Esche f077725674 Fix formatting 2019-08-30 00:47:54 +02:00
Vincent Esche 20487a63da Renamed existing remaining test functions to match naming scheme 2019-08-30 00:47:54 +02:00
Vincent Esche 4a649d9c1a Added unit tests for matrix arithmetic 2019-08-30 00:47:54 +02:00
Vincent Esche f19efad153 Improved documentation of Surge-provided assert functions 2019-08-30 00:12:25 +02:00
Vincent Esche f0b34e00c5 Improved assert helper ergonomics 2019-08-30 00:12:25 +02:00
Vincent Esche 597aa02ac2 Fixed linting warnings 2019-08-29 11:35:24 +02:00
Vincent Esche 1c35503972 Fixed formatting 2019-08-29 11:35:24 +02:00
Vincent Esche 00ad6b254a Fixed indentation of test function 2019-08-29 11:35:24 +02:00
Vincent Esche 5eeeded84b Added missing `…=` operators and tests for `Vector<Scalar>` 2019-08-29 11:35:24 +02:00
Vincent Esche bc62fbf7fd Added `func dist` & `func distSq` (squared distance) to `Vector` 2019-08-29 11:35:24 +02:00
Vincent Esche de484bbac3 Added `func dist` & `func distSq` (squared distance) to `[Scalar]` 2019-08-29 11:35:24 +02:00
Vincent Esche 9f858668d9 Added matrix-vector multiplication 2019-08-29 11:35:24 +02:00
Vincent Esche a2c2f66a2e Added `Vector<Scalar>` type and corresponding unit tests 2019-08-29 11:35:24 +02:00
Vincent Esche b3a75fa6d3 Fix formatting 2019-08-29 11:35:24 +02:00
Vincent Esche cf836d6fd1 Replaced `XCTAssertArray(Float|Double)EqualWithAccuracy(_:_:accuracy:)` with short-circuiting overload of `XCTAssertEqual(_:_:accuracy:)` 2019-08-29 11:35:24 +02:00
Lou Franco a6dd5f622e Matrix eigendecomposition (#95)
Added Two function that calculate the eigen-values and right eigen vectors for a given Matrix.
2019-02-09 07:18:07 -08:00
Alejandro Isaza 78fa390bb2
Allow empty matrix multiplication (#93) 2018-11-30 15:21:59 -08:00
Alejandro Isaza a3f3153c3c
Add UnsafeMemory abstraction (#77)
This simplifies the code dealing with unsafe pointers and allows
using existing functions with other collections.

Also update the copyright notices.
2018-04-01 12:23:36 -07:00
Alejandro Isaza 04f1b85527 Add function to compute matrix determinant
Fix #73
2017-11-25 13:27:22 -08:00
Alejandro Isaza 5f2e08b924 Add matrix subtraction
Fix #59
2017-11-25 12:27:50 -08:00
Alejandro Isaza e5445f0db8 Enable opt-in SwiftLint rules
Lint all schemes
2017-11-25 12:17:56 -08:00
Alejandro Isaza d893bff5cf
Add macOS, tvOS and watchOS targets (#74) 2017-11-18 10:51:01 -08:00
Alejandro Isaza 7c1b6ea3fc Add linter, fix linter warnigns, uncomment tests 2017-09-24 23:07:45 -07:00
Alejandro Isaza 7ba88899f3 Finish support for ContinuousCollection 2017-09-24 22:31:52 -07:00
Alejandro Isaza bbdd8626b2 Support ContinuousCollection in Auxiliary funcs 2017-09-23 13:38:20 -07:00
Alejandro Isaza 19606424a3 Remove extra function labels
Second parameter funcion labels seem to have been introduced when
switching to newer Swift versions. Removing them made the code cleaner.
2017-09-23 13:06:25 -07:00
Alejandro Isaza f86da504d4 Update to Swift 4.0 2017-09-22 22:35:58 -07:00
Alejandro Isaza 0f13bc62cf Correct use of unsafe pointers
All pointer use should happen inside a `withPointer` block so that the
compiler is aware of this unmanaged access. Fixed this everywhere and
added a few helper methods to make it less unwiedly.
2017-09-19 23:03:31 -07:00
Alejandro Isaza 5e9418d179 Fix Matrix init bug, for real now
Fix #57
2017-09-19 08:06:41 -07:00