Comments (6)
from surge.
seems to bypass error.
public func det(_ x: Matrix<Double>) -> Double? {
var decomposed = x
var pivots = [__CLPK_integer](repeating: 0, count: min(x.rows, x.columns))
var info = __CLPK_integer()
var m = __CLPK_integer(x.rows)
var n = __CLPK_integer(x.columns)
_ = withUnsafeMutableMemory(&pivots, &(decomposed.grid)) { ipiv, grid in
withUnsafeMutablePointers(&m, &n, &info) { m, n, info in
dgetrf_(m, n, grid.pointer, m, ipiv.pointer, info)
}
}
if info != 0 {
return nil
}
var det = 1 as Double
for (i, p) in zip(pivots.indices, pivots) {
if p != i + 1 {
det = -det * decomposed[i, i]
} else {
let detNew = det * decomposed[i, i]
det = detNew
}
}
return det
}
from surge.
github "johndpope/Surge" ~> 2.1.1
from surge.
@johndpope You're reporting a diagnostic generated by SwiftLint. This isn't a compiler error, and doesn't inherently prevent users from building their project.
This project defines a .swiftlint.yml
file, but doesn't enforce the shorthand_operator
rule. Looking at this particular case, I don't agree with the advice to prefer shorthand operators, and don't believe we should opt-in to this here.
I believe the general recommendation is to exclude 3rd-party dependencies from swiftlint
coverage, because such violations aren't directly actionable. You can do this by adding the following to your .swiftlint.yml
file:
excluded:
- Carthage
- Pods
from surge.
Makes sense. I’m fine with this. But request that a note is added in source to point somewhere explaining this. Otherwise others will trip up and have to search around for solution. Or add to read me as known issue. Or let’s raise an issue with swift lint to rectify and link here.
from surge.
Whoops on mobile and see you’re one step ahead. Thx
from surge.
Related Issues (20)
- Move Project to Separate Organization HOT 5
- How to read the results of "eigenDecompose" HOT 2
- Efficient non-allocating column/row-based Matrix iterators
- Efficient randomized initializers for Array/Vector/Matrix
- Auto-generate unit tests & benchmarks
- Migrate from `Float`/`Double` to `T: FloatingPoint` HOT 6
- Migrate API to a more idiomatic naming scheme HOT 1
- 3.0 Roadmap HOT 4
- feature request more numpy like dot
- is there some missing matrix functionality? HOT 1
- Warning: "Inout expression creates a temporary pointer, but argument 'imagp' should be a pointer that outlives the call to 'init(realp:imagp:)'" HOT 3
- missing power operator HOT 1
- Add documentation comments to public declarations
- Availability on Apple Watch? HOT 4
- randomNormal not documented HOT 1
- Not working on Watch app HOT 3
- some comfuse HOT 2
- Project Dead? HOT 5
- test_sqrt_in_place_array_float() fails on M1 Pro
- 库
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surge.