Skip to content

Added New Methods to WhitneyStratifications and CharacteristicClasses packages #3894

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

Merged
merged 5 commits into from
Jun 28, 2025

Conversation

Martin-Helmer
Copy link
Contributor

Added several new methods to the WhitneyStratifications package to compute Whitney stratifications using polar varieties and to compute the Euler characteristic of the complex link and the local Euler obstruction using Whitney stratification.

Added one new method to CharacteristicClasses to compute the Euler characteristic of a complex affine variety.

I forked from M2 development branch.

Added new methods for computation of Whitney stratification via polar varieties as well  as methods to compute the Euler characteristic of the complex link and the local Euler obstruction using Whitney stratification.
Added affine Euler characteristic method to CharacteristicClasses package.
Copy link
Member

@d-torrance d-torrance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! I have a few comments

@@ -22,6 +22,7 @@ newPackage(
"published article URI" => "https://msp.org/jsag/2015/7-1/p04.xhtml",
"published article DOI" => "10.2140/jsag.2015.7.31",
"published code URI" => "https://msp.org/jsag/2015/7-1/jsag-v7-n1-x04-CharacteristicClasses.m2",
"repository code URI" => "https://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/CharacteristicClasses.m2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This key was removed for all certified packages recently, so it shouldn't be re-added

DebuggingMode => false,
PackageImports=>{"Elimination","PrimaryDecomposition","Saturation"},
Keywords => {"Algebraic Geometry"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Keywords option shouldn't be removed. It's how packages are sorted in categories on the packages provided with Macaulay2 page.

Eu:=mutableMatrix(QQ,m,m);
for b from 1 to m do(
Zb:=sub(last strata_(m-b),R2);
if opts.Print==true then <<"big= "<<last strata_(m-b)<<endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing whether a boolean is true using == inside an if statement is redundant. This should just be if opts.Print then ...

This happens in lots of places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Doug! I fixed the things you noted and also cleaned up the print options a bit more.

Copy link
Member

@d-torrance d-torrance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@d-torrance d-torrance merged commit 121d2cc into Macaulay2:development Jun 28, 2025
5 checks passed
@Martin-Helmer Martin-Helmer deleted the martin-development branch July 6, 2025 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants