Last active
December 7, 2015 06:24
-
-
Save battleguard/164ae9c149bc25258471 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// | |
| /// IF YOU LOOK HERE AND COMPARE THE 2 OUTPUT I PRINT THERE DIFFERENT BUT LOOKING AT THE FORMULA ON THE PAPER | |
| /// http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3622359/#ref40 IT LOOKS LIKE YOUR VARIABLES ARE IN THE WRONG ORDER | |
| // actual formula from paper : E = DENSITY * Ein + (1 - DENSITY) * Eout | |
| // Ein = reference variance thing where you use 4 | |
| // Eout is the water one which is 80.4 | |
| // these 2 forumlas below will give different results | |
| // your way | |
| // // ref dialectric = 4 | |
| // outdielectric = 80.4 | |
| // output = (1.0 - density) * 4 + (density * 80.4) | |
| // doutputs[i] = ( ( 1.0 - moldensity ) * refdielectric ) + ( moldensity * outdielectric ); | |
| // your formula is setup at : E = (1 - DENSITY) * Ein + (DENSITY * Eout) | |
| private static double SmoothDielectricYourWay( double density, double referenceDielectricValue, double waterDielectricValue ) | |
| { | |
| return ( 1 - density ) * referenceDielectricValue + (density * waterDielectricValue); | |
| } | |
| private static double SmoothDielectric(double density, double referenceDielectricValue, double waterDielectricValue) | |
| { | |
| return density * referenceDielectricValue + ( 1 - density ) * waterDielectricValue; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment