← Back to team overview

yade-dev team mailing list archive

Re: Vector3 unsigned int

 

Out of curiosity, do you have concrete usage in mind?
That would be to gather 3 (always positive) indices of some gridpoint (i,j,k)

What would be the return type of the difference operator between two Vector3ui?
Indeed, I did not really think about it.. But in my mind, that would be the job of Eigen (which seems to handle unsigned types [*] ?) to decide, and I would just introduce a new typedef.


Actually my question came from the fear of falling under our recently strengthened warning=error compilation policy, through possible signed <-> unsigned conversions.

But I eventually did not face any of those in the meantime (while using classical Vector3i and other unsigned int variables), so maybe there was no point...


Thanks,

Jérôme


[*] http://eigen.tuxfamily.org/index.php?title=Versatility#Eigen_supports_many_numeric_types

------
Chargé de Recherche / Research Associate
Inrae, RECOVER
3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21
https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez

On 08/04/2020 16:49, Bruno Chareyre wrote:
Hi Jérôme,
Out of curiosity, do you have concrete usage in mind?
What would be the return type of the difference operator between two Vector3ui?
Cheers
Bruno

On Wed, 8 Apr 2020 at 16:10, Jerome Duriez <jerome.duriez@xxxxxxxx <mailto:jerome.duriez@xxxxxxxx>> wrote:

    Hi,

    It seems, in [*], we're not using typedef'd types for possible Eigen
    Vector3<unsigned int>("Vector3ui" maybe).

    Would you like / object to have one ?


    [*]
    https://gitlab.com/yade-dev/trunk/-/blob/master/lib/high-precision/MathEigenTypes.hpp

    Jérôme

    ------
    Chargé de Recherche / Research Associate
    Inrae, RECOVER
    3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
    +33 (0)4 42 66 99 21
    https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez


    _______________________________________________
    Mailing list: https://launchpad.net/~yade-dev
    Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
    <mailto:yade-dev@xxxxxxxxxxxxxxxxxxx>
    Unsubscribe : https://launchpad.net/~yade-dev
    More help   : https://help.launchpad.net/ListHelp



--
--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21
________________

Email too brief?
Here's why: email charter <https://marcuselliott.co.uk/wp-content/uploads/2017/04/emailCharter.jpg>



References