Skip to content
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

PMVector > < operators modify in-place #122

Closed
AtharvaKhare opened this issue May 26, 2019 · 1 comment

Comments

@AtharvaKhare
Copy link
Contributor

commented May 26, 2019

They should be returning a new PMVector.
Code to replicate:

x := #(1 2.5 3 4) asPMVector.
x > 2.
x. "==> a PMVector(false true true true)"

This affects PMMatrix due to it:

x := PMMatrix rows: #(#(1 2.5 3 4) #(1 2 3 8) #(23  2 5 7) #(23 2 7 6)).
y := PMMatrix rows: #(#(1 2.5 3 4) #(1 2 3 8) #(23  2 5 7) #(23 2 7 6)).
x > y. " Error "

primarily due to it using rowsCollect, which applies block directly to rows (PMVectors).

Using columnsCollect does not modify the Matrix in-place, as columnsCollect creates a copy of column and passes it to the PMVector > operator.

@AtharvaKhare

This comment has been minimized.

Copy link
Contributor Author

commented May 26, 2019

Also, should >= and <= operators be added as-well?

AtharvaKhare added a commit to AtharvaKhare/PolyMath that referenced this issue May 26, 2019

[PolyMathOrg#122] Fix PMVector comparison operators
- Also added relevant tests for the operators

SergeStinckwich added a commit that referenced this issue Jun 24, 2019

[#122] Fix PMVector comparison operators (#123)
- Also added relevant tests for the operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.