Code Monkey home page Code Monkey logo

Comments (3)

tpdickso avatar tpdickso commented on May 24, 2024 1

In terms of arithmetic operations on matrices, these don't necessarily correspond to simple componentwise operations; the * operator implements matrix multiplication, as opposed to just multiplying each entry. + and - do perform componentwise operations, but this is somewhat "coincidental" due to the fact that adding and subtracting matrices as mathematical objects "works out" to be a componentwise operation (and multiplication doesn't.) So I think the decision not to implement bit-shifts through operator overloading specifically is because these operations don't have a well-accepted meaning when applied to matrices, so it might be misleading to users.

from nalgebra.

tpdickso avatar tpdickso commented on May 24, 2024

This can be done with a constant bit shift amount using the map function on the matrix, or componentwise using the zip_map function. Would these work for your use case, or is there a strong reason to have dedicated functions for these?

from nalgebra.

Astralchroma avatar Astralchroma commented on May 24, 2024

Not really a "strong reason" other than its a basic math operation that could be supported, and all the others are, so why not? Just seemed it had been overlooked, because I couldn't find anything demonstrating a deliberate decision not to implement it.

from nalgebra.

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.