[vspline] 28/72: commit before removing pv.cc

Kay F. Jahnke kfj-guest at moszumanska.debian.org
Sun Jul 2 09:02:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

kfj-guest pushed a commit to branch master
in repository vspline.

commit 44dcbc97411e5cfc0efaf8b6e1bd3e03aa8a87ab
Author: Kay F. Jahnke <kfjahnke at gmail.com>
Date:   Tue Jan 17 10:46:39 2017 +0100

    commit before removing pv.cc
---
 basis.h             |  6 +++---
 common.h            |  2 +-
 poles.cc => poles.h | 21 ++++++++++++++++-----
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/basis.h b/basis.h
index 27c337b..4927629 100644
--- a/basis.h
+++ b/basis.h
@@ -60,9 +60,9 @@
 #ifndef VSPLINE_BASIS_H
 #define VSPLINE_BASIS_H
 
-// poles.cc has precomputed basis function values sampled at n * 1/2
+// poles.h has precomputed basis function values sampled at n * 1/2
 
-#include <vspline/poles.cc>
+#include <vspline/poles.h>
 
 namespace vspline {
 
@@ -74,7 +74,7 @@ namespace vspline {
 /// because the routine calls itself twice recursively, so the performance is
 /// N*N with the spline's degree. Luckily there are ways around using this routine
 /// at all - whenever we need the b-spline basis function value in vspline, it is
-/// at multiples of 1/2, and poles.cc has precomputed values for all spline
+/// at multiples of 1/2, and poles.h has precomputed values for all spline
 /// degrees covered by vspline. I leave the code in here for reference purposes.
 
 template < class real_type >
diff --git a/common.h b/common.h
index 6f7825c..00e11f4 100644
--- a/common.h
+++ b/common.h
@@ -219,7 +219,7 @@ typedef enum { UNBRACED , ///< implicit scheme, no bracing applied
 
 /// bc_name is for diagnostic output of bc codes
 
-std::vector < std::string > bc_name =
+const std::string bc_name[] =
 {
   "PERIODIC",
   "NATURAL",
diff --git a/poles.cc b/poles.h
similarity index 96%
rename from poles.cc
rename to poles.h
index 99878bf..e244548 100644
--- a/poles.cc
+++ b/poles.h
@@ -3,7 +3,7 @@
 /*    vspline - a set of generic tools for creation and evaluation      */
 /*              of uniform b-splines                                    */
 /*                                                                      */
-/*            Copyright 2015, 2016 by Kay F. Jahnke                     */
+/*            Copyright 2015 - 2017 by Kay F. Jahnke                    */
 /*                                                                      */
 /*    Permission is hereby granted, free of charge, to any person       */
 /*    obtaining a copy of this software and associated documentation    */
@@ -29,17 +29,28 @@
 /*                                                                      */
 /************************************************************************/
 
-/*! \file poles.cc
+/*! \file poles.h
 
     \brief precalculated prefilter poles and basis function values
 
-    The contents of this file below the coments can be generated using prefilter_poles.cc
+    The contents of this file below the comments can be generated
+    using prefilter_poles.cc
+
     While the precalculated basis function values can be generated in long double
     precision (with code in basis.h), the filter poles are calculated using
     gsl and BLAS, which provide only double precision.
+    
+    The values defined here are used in several places in vspline. They are
+    precomputed because calculating them when needed can be (potentially very)
+    expensive, and providing them by definitions evaluated at compile time
+    slows compilation.
+    
+    The set of values provided here is sufficient to calculate the b-spline
+    basis function for all spline degrees for arbitrary arguments (including
+    the spline's derivatives) - see basis.h. The poles are needed for prefiltering.
 */
 
-#ifndef VSPLINE_POLES_CC
+#ifndef VSPLINE_POLES_H
 
 namespace vspline_constants {
 
@@ -667,5 +678,5 @@ const long double* precomputed_basis_function_values[] = {
 
 } ; // end of namespace vspline_constants
 
-#define VSPLINE_POLES_CC
+#define VSPLINE_POLES_H
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vspline.git



More information about the debian-science-commits mailing list