test_math_fwd.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // test_math_fwd.cpp
  2. // Copyright John Maddock 2010.
  3. // Copyright Paul A. Bristow 2010.
  4. // Use, modification and distribution are subject to the
  5. // Boost Software License, Version 1.0. (See accompanying file
  6. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. // Basic sanity check that special functions forward declaration header
  8. // <boost/math/special_functions/math_fwd.hpp>
  9. // and distributions forward declarations header
  10. // <boost/math/distributions/fwd.hpp>
  11. // #includes all the files that it needs to.
  12. //
  13. #include <boost/math/special_functions/math_fwd.hpp>
  14. #include <boost/math/special_functions/beta.hpp>
  15. // using boost::math::beta;
  16. #include <boost/math/distributions/fwd.hpp>
  17. #include <boost/math/distributions/normal.hpp>
  18. // using boost::math::normal_distribution;
  19. int main()
  20. {
  21. // Special functions.
  22. // Call functions, discarding any result.
  23. using boost::math::beta;
  24. beta(1.,2.);
  25. // Distributions.
  26. using boost::math::normal_distribution;
  27. using boost::math::normal;
  28. // Construct some distributions.
  29. normal myf1(1., 2); // Using typedef.
  30. normal n01; // Use default values for mean and standard deviation).
  31. normal_distribution<> n01d(1., 2); // Using default RealType double.
  32. normal_distribution<float> n01f; // Using float type, and defaults.
  33. normal_distribution<float> myf22(0.f, 2.f); // Using explicit RealType float.
  34. return 0;
  35. }
  36. /*
  37. VS2010
  38. ------ Build started: Project: test_math_fwd, Configuration: Debug Win32 ------
  39. test_math_fwd.cpp
  40. test_math_fwd.vcxproj -> J:\Cpp\MathToolkit\test\Math_test\Debug\test_math_fwd.exe
  41. ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
  42. ------ Build started: Project: test_math_fwd, Configuration: Release Win32 ------
  43. test_math_fwd.cpp
  44. Generating code
  45. Finished generating code
  46. test_math_fwd.vcxproj -> J:\Cpp\MathToolkit\test\Math_test\Release\test_math_fwd.exe
  47. */