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

Pretty printing for expressions #206

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

florenzen
Copy link
Contributor

The change adds PrettyPrint methods to LinearExpression and ConstraintExpression that formats the reduced expression in a readable form. Coefficients close to 1 are omitted (i. e. ... + y - ... instead of ... + 1 * y - ...).

Since it needs the private reduce function of LinearExpression, I could not implement it outside of the LinearExpression type.

@florenzen
Copy link
Contributor Author

@matthewcrews, any chance to get this merged and also another release containing this, #205, and #204 (the latter already merged)?
Otherwise, I'd close the umerged PRs.

@matthewcrews matthewcrews merged commit 0515a27 into fslaborg:main Sep 25, 2024
1 check passed
@florenzen florenzen deleted the pretty-printing-for-expressions branch October 2, 2024 08:28
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