ankane / or-tools-ruby

Operations research tools for Ruby
Apache License 2.0
179 stars 26 forks source link

Add RICE binding for definition of a domain from values #67

Closed bgastinne-algolia closed 2 days ago

bgastinne-algolia commented 4 days ago

Hello,

When trying to use this library for a project (thank you by the way!) I was missing this function (it creates a domain from a list of distinct values instead of a range) that was available in my Python POC.

Adding this line was enough to have it working on my side, let me know if it's enough to add the function upstream too.

ankane commented 2 days ago

Thanks @bgastinne-algolia! I think it'd be better to use define_singleton_function, so updated in the commit above.

bgastinne-algolia commented 2 days ago

Awesome, thanks!