bigladder / btwxt

N-dimensional grid interpolation library
BSD 3-Clause "New" or "Revised" License
15 stars 8 forks source link

Add return types for normalization factor. #9

Closed ajscimone closed 4 years ago

codecov-io commented 5 years ago

Codecov Report

Merging #9 into master will increase coverage by 1.27%. The diff coverage is 88.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   84.41%   85.68%   +1.27%     
==========================================
  Files           8        8              
  Lines         417      419       +2     
==========================================
+ Hits          352      359       +7     
+ Misses         65       60       -5
Impacted Files Coverage Δ
src/btwxt.h 11.11% <ø> (ø) :arrow_up:
src/gridpoint.h 0% <ø> (ø) :arrow_up:
src/btwxt.cpp 71.05% <100%> (+7.89%) :arrow_up:
src/gridpoint.cpp 90.5% <80%> (+1.24%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a95d109...4634057. Read the comment docs.

nealkruis commented 4 years ago

@ajscimone Let's add a couple of unit tests in this repo to ensure we're getting the right output back. You can more-or-less use the same cases we used for EnergyPlus.

ajscimone commented 4 years ago

@nealkruis unit tests should now be added for scalar return functionality for both btwxt itself and GridPoints. There are two unit tests apiece, adding four total to the library. I have created a new test fixture named "TwoDSimpleNormalizationFixture" which is a 2D fixture which has very simple data corresponding to a f(x,y)=x*y type linear function to make this testing simpler and easy to read/understand. I am currently testing that both a single scalar target and a compound scalar are normalizing and returning correctly. Please take a look and let me know if you find these satisfactory, if they need cleaned up stylistically, or if tests should be expanded further.