Giter VIP home page Giter VIP logo

Comments (5)

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

helper/map.h is implemented that way, and it works.
We should do the same for set, list, pair, deque, stable_vector.

And we should add the new operators to helper::vector and helper::SVector.

from sofa.

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

started in https://github.com/anatoscope/sofa/tree/containers

from sofa.

damienmarchal avatar damienmarchal commented on August 19, 2024

Wouldn't it make sense to alias the std container to sofa::helper ?

So that the general guideline could be to always use sofa::helper::* and not "if your are using a list then use std::list, if it is a vector then use a sofa::helper::vector, ...".

More generally

  • it would make the source code more consistent
  • it would ease newcommer's life to get into sofa.

from sofa.

matthieu-nesme avatar matthieu-nesme commented on August 19, 2024

Also we could just define the stream operators << >> directly on std::vector (with the actual helper::vector implementations). So std::vector could be used in Data and helper::vector would be useful only for advanced users (like cuda-vector, stuff that is not necessary for regular Data).

from sofa.

damienmarchal avatar damienmarchal commented on August 19, 2024

There is a PR that resulted from this discussion and it was merged.
I close the Issue, do not hesitate to reopen in case it is too early.

from sofa.

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.