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

Add support for Dirac weights #49

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

greg-neustroev
Copy link
Collaborator

Closes #17

The code was missing projection onto standard basis. The operation is simple: return a vector of all zeros and put one where the maximum element was. E.g., [0.0, 0.5, 2.0, -3.0] becomes [0.0, 0.0, 1.0, 0.0].

@greg-neustroev greg-neustroev requested a review from datejada July 1, 2024 12:55
Copy link
Member

@datejada datejada left a comment

Choose a reason for hiding this comment

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

LGTM

@datejada datejada merged commit a1fbf70 into TulipaEnergy:main Jul 2, 2024
11 checks passed
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.

Implement projection onto a discrete space
2 participants