-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logical and Bitshift operators for vectors #2617
Comments
With R3 you can replace |
related: #2524 |
@ldci your code would be more clear, if you would use words instead of integers for ops. Also I cannot check it myself now, but in Red, does the operation modifies the vector or returns a new one? I would implement it myself by modifying it personally. |
Hi David
You’re right, better with word
In Red x + y returns a new vector without modifying x and y
[image001.png][image002.png]
François Jouen
<https://univ-psl.fr/>
École Pratique des Hautes Études
Doyen Honoraire de la section des Sciences de la Vie et de la Terre
Chaire de Psychobiologie du Développement
Plateforme Réanimation Pédiatrique Raymond Poincaré. Hôpital de Garches
Laboratoire Cognitions Humaine et Artificielle
Campus Condorcet
14 cours des Humanités
15 rue Waldeck Rochet
93322 Aubervilliers cedex
06 87 13 76 81
***@***.******@***.***>
www.ephe.fr<http://www.ephe.fr/>
Le 16 août 2024 à 14:20, Oldes Huhuman ***@***.***> a écrit :
@ldci<https://github.com/ldci> your code would be more clear, if you would use words instead of integers for ops.
Also I cannot check it myself now, but in Red, does the operation modifies the vector or returns a new one? I would implemented it as modifying personally.
—
Reply to this email directly, view it on GitHub<#2617 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAXI3ILXJH6XFEDQOHR5F2DZRXVADAVCNFSM6AAAAABMSGAVH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGQYDQOJVG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm not sure if the "always copy" is the best solution, because what if you want to modify the vector only? |
In Red logical operators (and, or and xor) can be used with vectors. This is not the case with R3.
Here is a general function for R3 and Red:
And the samples
The text was updated successfully, but these errors were encountered: