Comments (4)
In my libraries, I define a Hadamard operator for element-wise operations.
https://en.wikipedia.org/wiki/Hadamard_product_(matrices)
It's useful, and comes up frequently in signal processing and quantum computing. Some languages define an operator for it .* (dot star)
On the topic of matrix * vector, homogeneous and non-homogenous multiplies are interesting, as are v3f multiplications with an implicit w of 1.
from linalg.
I think this is a question of semantics. Element-wise is behavior of ndarray. It is like numpy arrays etc.
I still think it was a good decision to interpret matrix and vectors in ndarray's semantic.
If it go back to algebraic semantics, the library will no longer look so basic as it now looks.
On the question immediately comes to mind the question, what about the multiplication of quaternions? In the current state, this is simply the same superstructure above ndarray's semantics as algebraic matrix operations. If you put matrix operations at the center, the status of quaternions and other objects that can be built on the basis of this library will be strange.
P.S. I allow myself to express the opinion that feedback from users could be unrepresentative, since the number of messages from users who found the current state of affairs would obviously be less than the number of messages from those who found it strange, while the number of such users could be identical.
from linalg.
Indeed it is a question of semantics. I'm one of the authors of Imath, so naturally I am biased to the algebraic conventions found there :)
from linalg.
Implemented in the v3
branch, which additionally introduces a quat<T>
type. Component-wise operations are still explicitly available via the apply(...)
function, which subsumes the original behavior of map(...)
and zip(...)
.
The most recent commit that retains the original semantics of the library has been tagged v2.1
. I'll be open to providing small bugfixes and improvements to v2.1
.
from linalg.
Related Issues (20)
- Reduction functions for matrices? HOT 2
- Identity() HOT 3
- User Code Extensions HOT 3
- Undefined behavior on operator[] overload prevents use in constexpr context HOT 3
- Finish documentation for `v3` branch. HOT 1
- Impossible to create row vectors HOT 5
- Question about column order. HOT 1
- Doesn't build on MSVC 2017 HOT 3
- Future usability wishlist HOT 4
- `mul()` gives wrong answer? HOT 1
- Feature request: Disable operator * for matrices? HOT 2
- Initializing a std::array of vecs HOT 3
- glm::lookAt equivalent? HOT 10
- `using namespace linalg::ostream_overloads` sometimes does not work. HOT 1
- Suggestion: projection_onto() and rejection_from() functions for vectors HOT 1
- Convert a mat4 to a mat3 and back
- Compilation with clang fails on OS X (error: ambiguous call to std::abs()) HOT 1
- rotation_quat fails in some cases HOT 8
- avoid GCC -Wshadow warnings? HOT 2
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 linalg.