Skip to content

Integer handling for feasible sets#83

Merged
ahmed-irfan merged 8 commits intoSRI-CSL:masterfrom
Ovascos:feasible-set-int
Oct 9, 2024
Merged

Integer handling for feasible sets#83
ahmed-irfan merged 8 commits intoSRI-CSL:masterfrom
Ovascos:feasible-set-int

Conversation

@Ovascos
Copy link
Contributor

@Ovascos Ovascos commented Oct 7, 2024

This PR adds support for query the number of integers in a feasible set.

int lp_feasibility_set_is_point_int(const lp_feasibility_set_t* set) {
long cnt = 0;
for (size_t i = 0; i < set->size; ++i) {
long tmp = lp_interval_count_int(set->intervals + i);
Copy link
Member

Choose a reason for hiding this comment

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

wondering if we can check this without counting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Counting is more or less for free, as it is "just" one subtraction per interval.

Copy link
Member

@ahmed-irfan ahmed-irfan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks

@ahmed-irfan ahmed-irfan merged commit a79b13b into SRI-CSL:master Oct 9, 2024
@Ovascos Ovascos deleted the feasible-set-int branch October 10, 2024 09:40
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