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

Infinity alias #53

Closed
renatocf opened this issue Jan 14, 2016 · 6 comments
Closed

Infinity alias #53

renatocf opened this issue Jan 14, 2016 · 6 comments
Assignees

Comments

@renatocf
Copy link
Member

renatocf commented Jan 14, 2016

Create an Infinity alias in the same header where Probability is defined, in order to fully encapsulate floating point types in more meaningful definitions.

@igorbonadio
Copy link
Member

Should we have an generic Infinity type? Because not all infinities are probabilities...

@igorbonadio
Copy link
Member

Or maybe it is better a Zero alias... as -std::numeric_limits<Probability>::infinity() means p(x)=0.

@renatocf
Copy link
Member Author

Hmm... So shouldn't we split our concepts in a Probability and a LogProbability types? I think that would be a more accurate description of what we are using through the system. Or, if all our probabilities are standardized in one of them, then we should use the concept of infinite / zero properly.

Anyway, the idea behind this issue is to use a more semantic representation of what our methods are returning. This will have a direct impact in how assertions shall be made in #50.

@renatocf
Copy link
Member Author

@igorbonadio,

There is a long time we don't discuss this issue. What do you think about it? Does it worth we have a LogProbability alias besides the current Probability class?

I believe my last argument is very reasonable, and I'd like to make this refactoring before going to issue #11. What do you think?

@igorbonadio
Copy link
Member

I think we don't need a Probability type because we only use LogProbabilities...

Maybe it is better to rename Probability to LogProbability and create an Infinity type.

@renatocf
Copy link
Member Author

I think this is a good solution. I'll implement it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants