Comments (2)
Note: http://hackage.haskell.org/package/linear-1.16.1/docs/Linear-Vector.html#v:E
newtype E t = E { el :: forall x. Lens' (t x) x }
so your last example is either
> tabulate (\(E i) -> set i 0 x) :: M22 Int
> tabulate (\i -> set (el i) 0 x) :: M22 Int
I don't know if that helps your final question, but it helps your code compile.
from linear.
Awesome, thanks!
from linear.
Related Issues (20)
- Drop the Herbie optimizations? HOT 2
- Comonad Instances for V1..V4, and V n HOT 1
- better unit tests HOT 2
- add frobenius norm? HOT 1
- A Faster Linear.V.V HOT 1
- Alternative to LGPL-dependency integer-gmp
- length-indexed lists
- Split Linear.Epsilon into own package. HOT 2
- -f-template-haskell causes build failure HOT 1
- lerp interpolates the wrong way? HOT 6
- Field[n] instance for Affine.Point? HOT 1
- compilation broken with `random-1.2.1` HOT 1
- Epsilon without Num HOT 7
- Derive instance Real a => Real (V1 a) HOT 5
- Why is `_Point` an `Iso'`, rather than a type-changing `Iso`? HOT 6
- Does not build with `vector-0.13.*`
- Support for Octonions?
- luSolve fails for matrices with zeros on the main diagonal
- use atan2 in V2.unangle
- Use microlens instead of lens HOT 1
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 linear.