Homogenization: the pos parameter? #2494
Replies: 7 comments 7 replies
-
This is naturally used EVERYWHERE. Think, for example, about going back and force from a projective variety in P^n to the corresponding affine varieties in affine charts U_0, …, U_n.
We may consider, however, to make the default value n+1. This will ease the problems arising from the fact that vectors in julia are not allowed to start from index 0. In OSCAR, we are forced to use 1, …, n+1 instead.
… Am 27.06.2023 um 13:04 schrieb JohnAAbbott ***@***.***>:
The functions homogenization for polynomials and ideals have a pos parameter (with default value 1).
Is this parameter actually used anywhere: I mean, when might one call homogenization and specify a non-default value for this parameter?
I ask because my current new implementation for homogenization (of ideals) does not yet have such a parameter. It could be added, but would make the code rather messier. So I just want to be convinced that there are genuine use-cases where the caller needs to specify the value for pos. I would not expect the extra code needed to handle a pos value to have a measurable adverse effect on execution speed... readability is another matter altogether.
—
Reply to this email directly, view it on GitHub <#2494>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AASSXEUJNBHSVEFTZ3RK2XTXNK42PANCNFSM6AAAAAAZVNWDKY>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
OK. I'll update the code. |
Beta Was this translation helpful? Give feedback.
-
i have pushed the new code to github. The new function is called |
Beta Was this translation helpful? Give feedback.
-
After talking with @wdecker yesterday we decided that the default value for the
but this will crash/error if
which does not score too highly in the readability stakes. Another possibility is to do the following
I welcome guidance about preferred approach here, ideally with some justification for the guidance. |
Beta Was this translation helpful? Give feedback.
-
Post first, think later... I overlooked the obvious and most flexible solution: namely write out explicitly two methods:
Advantages: reader can tell at-a-glance that there are 2 methods, full flexibility for computing the default value. |
Beta Was this translation helpful? Give feedback.
-
I have now revised the code to use 2 explicit function definitions rather than a default value for the |
Beta Was this translation helpful? Give feedback.
-
See also discussion #2582 |
Beta Was this translation helpful? Give feedback.
-
The functions
homogenization
for polynomials and ideals have apos
parameter (with default value 1).Is this parameter actually used anywhere: I mean, when might one call
homogenization
and specify a non-default value for this parameter?I ask because my current new implementation for
homogenization
(of ideals) does not yet have such a parameter. It could be added, but would make the code rather messier. So I just want to be convinced that there are genuine use-cases where the caller needs to specify the value forpos
. I would not expect the extra code needed to handle apos
value to have a measurable adverse effect on execution speed... readability is another matter altogether.Beta Was this translation helpful? Give feedback.
All reactions