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

isNaN le danger #6

Open
Yomguithereal opened this issue Feb 18, 2017 · 2 comments
Open

isNaN le danger #6

Yomguithereal opened this issue Feb 18, 2017 · 2 comments

Comments

@Yomguithereal
Copy link

isNaN est une fonction piègeuse qui ne fait pas forcément ce tu crois qu'elle fait. Elle a des edge cases chelous.

@luccitan
Copy link
Owner

Peux-tu développer stp ?

Le cas du null dans l'attribut de poids est réglé, puisqu'il ne sera considéré comme 0 dans le calcul de ∆Q.
Le cas d'un poids égal à Infinity pourrait cependant poser problème par contre.

Le calcul de modularité renverrait alors NaN puisque M serait égal à Infinity.

@Yomguithereal
Copy link
Author

Genre isNaN([0]) => false. Mais dans ton cas je pense pas que ce genre de edge cases ne pose problème. Je ne me souviens plus.

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