Code Monkey home page Code Monkey logo

Comments (4)

meshula avatar meshula commented on September 27, 2024

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.

mirmik avatar mirmik commented on September 27, 2024

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.

meshula avatar meshula commented on September 27, 2024

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.

sgorsten avatar sgorsten commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.