Index: trunk/tests/Makefile.quad =================================================================== --- trunk/tests/Makefile.quad (revision 717) +++ trunk/tests/Makefile.quad (revision 718) @@ -1,129 +1,129 @@ # If this file is used, don't forget to set LD_LIBRARY_PATH properly, # so that the code picks up the quad precision versions of liblapack.so # and libblas.so. # Set the following three variables correctly. UTESTPP_DIR = /home/igv/Code/UnitTest++ QUAD_LIBDIR = /home/igv/local_quad/lib FFTW_LIBDIR = /usr/local/lib OFILES_COMMON = test_utils.o OTESTS_FAST = test_ArrayND.o test_OrthoPoly1D.o test_OrthoPolyND.o \ test_Functors.o test_interpolation.o test_LocalPolyFilterND.o \ test_Distributions1D.o test_InterpolatedDistribution1D.o \ test_EmpiricalCopula.o test_BoxNDScanner.o \ test_QuadraticOrthoPolyND.o test_LocalLogisticRegression.o \ test_randomPermutation.o test_gegenbauerSeriesSum.o \ test_GaussHermiteQuadrature.o test_SpecialFunctions.o \ test_GaussLegendreQuadrature.o test_WeightedStatAccumulator.o \ test_RandomSequenceRepeater.o test_logLikelihoodPeak.o \ test_legendreSeriesSum.o test_solveCubic.o test_HistoND.o \ test_SampleAccumulator.o test_GridInterpolatedDistribution.o \ test_GridAxis.o test_Matrix.o test_StatUtils.o \ test_amiseOptimalBandwidth.o test_OrderedPointND.o \ test_CompositeDistributionND.o test_CompositeBuilder.o \ test_ArchiveIO.o test_Ntuples.o test_LocalQuantileRegression.o \ test_rectangleQuadrature.o test_RegularSampler1D.o \ test_Instantiations.o test_chebyshevSeriesSum.o \ test_dawsonIntegral.o test_NMCombinationSequencer.o \ test_CrossCovarianceAccumulator.o test_StatAccumulatorPair.o \ - test_findPeak2D.o test_StatAccumulatorArr.o \ + test_findPeak2D.o test_StatAccumulatorArr.o test_SeriesCGF1D.o \ test_goldenSectionSearch.o test_empiricalQuantile.o \ test_StatAccumulator.o test_binomialCoefficient.o \ test_CircularMapper1d.o test_LinInterpolatedTableND.o \ test_StorableMultivariateFunctor.o test_NeymanPearsonWindow1D.o \ test_hermiteSeriesSum.o test_hermiteSeriesSumPhys.o \ test_DiscreteDistributions1D.o test_LocalPolyFilter1D.o \ test_definiteIntegrals.o test_ExpMapper1d.o test_MathUtils.o \ test_MemoizingSymbetaFilterProvider.o test_ResponseMatrix.o \ test_gaussianResponseMatrix.o LogLogQuadratic1D.o \ WeightedTestAccumulator.o TestAccumulator.o test_histoUtils.o \ test_LocalMultiFilter1D.o test_InterpolatedCompositeBuilder.o \ test_DensityAveScanND.o test_Distro1DBuilder.o \ test_findRootNewtonRaphson.o test_cumulantUncertainties.o \ test_ClassicalOrthoPolys1D.o test_ContOrthoPoly1D.o \ test_findRootUsingBisections.o test_orthoPoly1DVProducts.o \ test_truncatedInverseSqrt.o test_FejerQuadrature.o \ test_matrixIndexPairs.o test_KDE1DKernel.o test_Interval.o \ test_likelihoodStatisticCumulants.o test_Uncertainties.o \ - test_DistributionsND.o EdgeworthSeries1DOld.o \ - test_SequentialPolyFilterND.o test_SeriesCGF1D.o \ - test_HeatEq1DNeumannBoundary.o test_OSDE1D.o + test_DistributionsND.o EdgeworthSeries1DOld.o test_OSDE1D.o \ + test_SequentialPolyFilterND.o test_HeatEq1DNeumannBoundary.o \ + test_ScalableClassicalOrthoPoly1D.o OTESTS_COMPREHENSIVE = test_ArrayND_cmh.o test_DiscreteBernstein.o \ test_KDTree.o test_rescanArray_cmh.o test_lorpeMise1D.o # OPTIMIZE = -std=c++11 -g -ggdb -O0 OPTIMIZE = -std=c++11 -O3 INCLUDES = -I. -I.. -I$(UTESTPP_DIR)/src -I$(FFTW_LIBDIR)/../include CPPFLAGS = $(OPTIMIZE) $(INCLUDES) -DUSE_LAPACK_QUAD -fext-numeric-literals \ -Wall -W -Werror -Wno-unused-parameter LIBS = -L$(QUAD_LIBDIR) -L../npstat/.libs -lnpstat -L$(UTESTPP_DIR) -lUnitTest++ \ -L$(FFTW_LIBDIR) -lfftw3 -llapack -lblas \ -L/usr/local/lib -lrk -lgeners -lbz2 -lz -lkstest -lgfortran -lm -lquadmath %.o : %.cc g++ -c $(CPPFLAGS) -fPIC -MD $< -o $@ @sed -i 's,\($*\.o\)[:]*\(.*\),$@: $$\(wildcard\2\)\n\1:\2,g' $*.d # Change the "all" target below to suit your development needs. # Useful targets which can be included are: # # fast fast_run # comprehensive comprehensive_run # regression regression_run # # The tests inside the "fast" target are a subset of tests from the # "comprehensive" target all: fast fast_run # all: fast regression fast_run regression_run # all: comprehensive comprehensive_run regression regression_run fast: test_main.o $(OTESTS_FAST) $(OFILES_COMMON) rm -f $@ g++ $(OPTIMIZE) -fPIC -o $@ $^ $(LIBS) fast_run: fast ./fast comprehensive: test_main.o $(OTESTS_FAST) \ $(OTESTS_COMPREHENSIVE) $(OFILES_COMMON) rm -f $@ g++ $(OPTIMIZE) -fPIC -o $@ $^ $(LIBS) comprehensive_run: comprehensive ./comprehensive regression: regression_run: regression @ echo Running regression tests. PROGRAMS = kdtree_speed.cc quantileBinFromCdf.cc incompleteGamma.cc \ convertToSpherical.cc printPermutations.cc showIOTraits.cc \ hugeNtuple.cc hugeNtupleRead.cc histoStdev.cc effectiveDim.cc \ buildInterpolatedCheck.cc legendreRoots.cc jacobiPolyStats.cc \ jacobiVProducts.cc jacobiEpsTest.cc gauss2DRandom.cc PROGRAMS += cpp11Random.cc PROGRAMS += failingTest.cc BINARIES = $(PROGRAMS:.cc=) binaries: $(BINARIES) $(BINARIES): % : %.o $(OFILES_COMMON); g++ $(OPTIMIZE) -fPIC -o $@ $^ $(LIBS) clean: rm -f fast comprehensive $(BINARIES) \ *.out core.* *.o *.d *~ *.gsbd *.gsbmf -include test_main.d -include $(OFILES_COMMON:.o=.d) -include $(OTESTS_FAST:.o=.d) -include $(OTESTS_COMPREHENSIVE:.o=.d) -include $(PROGRAMS:.cc=.d) Index: trunk/tests/test_rectangleQuadrature.cc =================================================================== --- trunk/tests/test_rectangleQuadrature.cc (revision 717) +++ trunk/tests/test_rectangleQuadrature.cc (revision 718) @@ -1,49 +1,65 @@ #include -#include "UnitTest++.h" +#include "UnitTest++.h" #include "test_utils.hh" + #include "npstat/nm/rectangleQuadrature.hh" +#include "npstat/nm/GaussLegendreQuadrature2D.hh" using namespace npstat; using namespace std; namespace { - class TestFunctor1D : public AbsMultivariateFunctor + struct TestFunctor1D : public AbsMultivariateFunctor { inline unsigned minDim() const {return 1U;} double operator()(const double* point, unsigned dim) const { assert(dim == minDim()); const double x = point[0]; return 3*x*x + 4*x - 7; } }; - class TestFunctor2D : public AbsMultivariateFunctor + struct TestFunctor2D : public AbsMultivariateFunctor { inline unsigned minDim() const {return 2U;} double operator()(const double* point, unsigned dim) const { assert(dim == minDim()); const double x = point[0]; const double y = point[1]; return 2*x*x + 3*y*y - 4*x*y + 5*x + 6*y - 10; } + + double operator()(const double x, const double y) const + { + return 2*x*x + 3*y*y - 4*x*y + 5*x + 6*y - 10; + } }; TEST(rectangleQuadrature) { const double rectangleCenter[2] = {2.5, 4.5}; const double rectangleSize[2] = {3.0, 5.0}; - + const double integ1 = rectangleIntegralCenterAndSize( TestFunctor1D(), rectangleCenter, rectangleSize, 1, 4); CHECK_CLOSE(72.0, integ1, 1.0e-12); + TestFunctor2D f2d; const double integ2 = rectangleIntegralCenterAndSize( - TestFunctor2D(), rectangleCenter, rectangleSize, 2, 4); + f2d, rectangleCenter, rectangleSize, 2, 4); CHECK_CLOSE(1965/2.0, integ2, 1.0e-12); + + GaussLegendreQuadrature2D glq2d(4, 4); + const double xmin = rectangleCenter[0] - rectangleSize[0]/2.0; + const double xmax = rectangleCenter[0] + rectangleSize[0]/2.0; + const double ymin = rectangleCenter[1] - rectangleSize[1]/2.0; + const double ymax = rectangleCenter[1] + rectangleSize[1]/2.0; + const double integ3 = glq2d.integrate(f2d, xmin, xmax, ymin, ymax); + CHECK_CLOSE(integ2, integ3, 1.0e-14); } } Index: trunk/npstat/nm/00README.txt =================================================================== --- trunk/npstat/nm/00README.txt (revision 717) +++ trunk/npstat/nm/00README.txt (revision 718) @@ -1,306 +1,312 @@ The code in this directory should not depend on headers from any other directory of the "npstat" package. This directory contains implementations for a number of useful mathematical objects, integration and root finding codes, etc. The classes and functions can be approximately split into the following subject groups: * Multidimensional arrays, grids, and related utilities * Optimization and root finding * Integration * Interpolation * Orthogonal polynomials and filtering * Searcheable multidimensional structures * Miscellaneous utilities Multidimensional arrays, grids, and related utilities ----------------------------------------------------- ArrayND.hh -- Multidimensional array template. ArrayNDScanner.hh -- A class which can be used to iterate over multidimensional array indices. Useful when the array itself is not available (for example, for iterating over slices, etc). AbsArrayProjector.hh -- Interface class used in iterations over array elements. AbsMultivariateFunctor.hh -- Interface class for a variety of multivariate functor-based calculations. CoordinateSelector.hh -- A trivial AbsMultivariateFunctor implementation which selects one of the elements from the input array. MultivariateFunctorScanner.hh -- Utility for filling array values from multivariate functors. AbsVisitor.hh -- Another interface class used in iterations over array elements. Use this if elements indices is not of interest and only the array value is used. ArrayRange.hh -- Used in constructing array subranges. ArrayShape.hh -- Defines the shape of multidimensional arrays. BoxND.hh -- Represents rectangles, boxes, and hyperboxes BoxNDScanner.hh -- A class for iterating over all coordinates in a multidimensional box (like using histogram bin centers). EigenMethod.hh -- Helper enum for use with Matrix methods for finding eigenvalues and eigenvectors. SvdMethod.hh -- Helper enum for use with Matrix methods for performing singular value decompositions. GridAxis.hh -- Can be used to define an axis of a rectangular grid (not necessarily equidistant). Interval.hh -- 1-d intervals. Used by BoxND to bulid boxes. Matrix.hh -- A simple matrix template. Outsorces most of its more advanced functionality to LAPACK. matrixIndexPairs.hh -- A utlitity for enumerating matrix elements on the main diagonal and above. PointDimensionality.hh -- Compile-time dimensionality detector for classes like std::array. UniformAxis.hh -- Can be used to define an equidistant axis of a rectangular grid. DualAxis.hh -- Can be used to define either equidistant or non-uniform axis, with O(1) coordinate lookup for equidistant grids. fillArrayCentersPreservingAreas.hh -- It is assumed that we have an array with the number of elements increased by an integer factor in each dimension in comparison with the original array. This array is filled from the original one in the manner appropriate for subsequent smoothing. This is useful in certain rebinning situations, when some quantity calculated on some grid needs to be smoothed and interpolated on a denser grid. truncatedInverseSqrt.hh -- Truncate the square root of a symmetric positive semidefinite matrix by keeping eigenvectors corresponding to largest eigenvalues. Optimization and root finding ----------------------------- MinSearchStatus1D.hh -- Status of minimum search on a 1-d interval. findPeak2D.hh -- Reliable peak finding on 2-d grids. goldenSectionSearch.hh -- Search for 1-d function minimum using the golden section method. findRootInLogSpace.hh -- Search for a solution of a single equation of the type f(x) == rhs where x is some type that can be multiplied by a positive double. Uses interval division. findRootNewtonRaphson.hh -- Search for a solution of a single equation of the type f(x) == rhs using the Newton-Raphson method. findRootUsingBisections.hh -- Search for a solution of a single equation of the type f(x) == rhs using bisections. See also "MathUtils.hh" header for codes that find roots of quadratic and cubic equations. Integration ----------- FejerQuadrature.hh -- 1-d Fejer quadratures (essentially, using Chebyshev polynomials). GaussHermiteQuadrature.hh -- 1-d Gaussian quadratures using Hermite polynomials. GaussLegendreQuadrature.hh -- 1-d Gaussian quadratures using Legendre polynomials. +GaussLegendreQuadrature2D.hh -- 2-d tensor-product Gaussian quadratures + using Legendre polynomials. + rectangleQuadrature.hh -- Gaussian quadratures on rectangles and hyperrectangles using tensor product integration. SemiInfGaussianQuadrature.hh -- Quadrature on the [0, Inf] interval with weight exp(-x^2/2) Interpolation ------------- bilinearSection.hh -- Finds the contours of the intersection of a bilinear interpolation cell (specified by values at the corners of the unit square) with a given constant level. For use in higher-level mapping and contouring algorithms. interpolate.hh -- Simple interpolating polynomials (linear, quadratic, cubic) on regularly spaced 1-d grids. LinInterpolatedTable1D.hh -- Linearly interpolated table in 1-d. LinInterpolatedTableND.hh -- Interpolated table in multiple dimensions (with multilinear interpolation). LinearMapper1d.hh -- Linear functor in 1-d for use in interpolation and extrapolation. CircularMapper1d.hh -- Linear coordinate mapper for circular topologies. LogMapper1d.hh -- Functor which is linear in log(x). Useful for interpolating functions of strictly positive quantities. ExpMapper1d.hh -- Functor which is linear in log(y). Useful for interpolating functions that are strictly positive. rescanArray.hh -- A utility for filling one array using values of another. The arrays are treated as values of histogram bins inside the unit box, and interpolations are performed as necessary. Orthogonal polynomials and filtering ------------------------------------ AbsClassicalOrthoPoly1D.hh -- Base class for classical orthogonal polynomials. ClassicalOrthoPolys1D.hh -- Concrete implementations of various classical orthogonal polynomials (Legendre, Jacobi, etc). ContOrthoPoly1D.hh -- Continuous orthogonal polynomials for discrete measures (intended for constructing empirical chaos polynomials). ConvolutionEngine1D.hh -- FFTW double precision interface to be used for implementing convolutions in 1-d. ConvolutionEngineND.hh -- FFTW double precision interface to be used for implementing convolutions on grids of arbitrary dimensionality. DiscreteBernsteinPoly1D.hh -- Discrete Bernstein polynomials in one dimension (preserving the partition of unity property). FourierImage.hh -- Wrapper class for memory blocks allocated by fftw_malloc and deallocated by fftw_free. Intended for storing results of Fourier transforms. HeatEq1DNeumannBoundary.hh -- Solution of 1-d heat equation with Neumann boundary conditions (no heat transfer through the boundary). Useful mainly for generating doubly stochastic matrices. OrthoPoly1D.hh -- Discrete orthogonal polynomials in 1-d (typically, for use in linear filters). OrthoPolyND.hh -- Discrete orthogonal polynomials of arbitrary dimensionality in hyperrectangular domains. OrthoPolyMethod.hh -- Enum for the methods used to construct the continuous polynomials (class ContOrthoPoly1D). +ScalableClassicalOrthoPoly1D.hh -- Class for scaling and shifting classical + orthogonal polynomials. + StorablePolySeries1D.hh -- Storable functor for orthogonal polynomial series. See also "MathUtils.hh" header for codes that calculate series for some classical orthogonal polynomial systems. Searcheable multidimensional structures --------------------------------------- CompareByIndex.hh -- Comparison functor for objects that support subsripting. Used by k-d tree code. KDTree.hh -- Balanced k-d tree implementation. All points must be known in advance. Miscellaneous utilities ----------------------- absDifference.hh -- Proper calculation of absolute value and absolute difference of two values for a number of types including unsigned, complex, etc. allocators.hh -- A few utility functions related to memory management. areAllElementsUnique.hh -- A simple template for checking uniqueness of container values using O(N^2) algorithm. binomialCoefficient.hh -- Calculation of binomial coefficients which avoids overflows. closeWithinTolerance.hh -- Closeness comparison for doubles. ComplexComparesAbs.hh -- Use ComplexComparesAbs::less in the templated ComplexComparesFalse.hh code when it makes sense to do comparison of complex numbers by magnitude and comparison of other types by "operator<". ComplexComparesFalse::less returns "false" for complex types and compares other types with "operator<". "more" methods are similar. ConstSubscriptMap.hh -- A variation of std::map template with const subscripting operator. definiteIntegrals.hh -- Definite integrals based on exact expressions. discretizedDistance.hh -- L1 and L2 distances for discretized functions. EquidistantSequence.hh -- Sequences of points equidistant in 1-d linear or log space. GeneralizedComplex.hh -- Define a type which will be set to std::complex for T from float, double, and long double, and to T for all other types. isMonotonous.hh -- A few simple templates for checking monotonicity of container values. lapack.h -- LAPACK-related declarations (F77 versions). lapack_interface.hh -- High-level interface to some of the LAPACK functions. LongerType.hh -- "Longer" type deduction for binary operations. MathUtils.hh -- Miscellaneous utilities. PairCompare.hh -- Additional comparison functors for std::pair. performSchultzIteration.hh -- Schultz iteration for calculating matrix inverses in long double precision (used internally by the Matrix class). PreciseType.hh -- PreciseType::type is typedefed to "long double" for primitive scalar types and to "std::complex" for complex types. ProperDblFromCmpl.hh -- ProperDblFromCmpl::type is a floating point type which can be multiplied by T when T is complex, otherwise it is just "double". PtrBufferHandle.hh -- Resource handler for an array of pointers to explicitly allocated objects (to complement a vector of pointers). Not for use by application code. SimpleFunctors.hh -- Interface classes and concrete simple functors for a variety of functor-based calculations. SpecialFunctions.hh -- Special functions. timestamp.hh -- Generate a trivial time stamp in the format hh:mm:ss. Triple.hh -- A template with three members, similar to std::pair in purpose and functionality. Index: trunk/npstat/nm/ScalableClassicalOrthoPoly1D.hh =================================================================== --- trunk/npstat/nm/ScalableClassicalOrthoPoly1D.hh (revision 717) +++ trunk/npstat/nm/ScalableClassicalOrthoPoly1D.hh (revision 718) @@ -1,166 +1,175 @@ #ifndef NPSTAT_SCALABLECLASSICALORTHOPOLY1D_HH_ #define NPSTAT_SCALABLECLASSICALORTHOPOLY1D_HH_ -#include +/*! +// \file ScalableClassicalOrthoPoly1D.hh +// +// \brief Class for shifting and scaling classical continuous orthonormal +// polynomials +// +// Author: I. Volobouev +// +// October 2020 +*/ #include "npstat/nm/AbsClassicalOrthoPoly1D.hh" namespace npstat { class ScalableClassicalOrthoPoly1D { public: ScalableClassicalOrthoPoly1D(const AbsClassicalOrthoPoly1D& poly, long double location, long double scale); ScalableClassicalOrthoPoly1D(const ScalableClassicalOrthoPoly1D&); ScalableClassicalOrthoPoly1D& operator=(const ScalableClassicalOrthoPoly1D&); inline ~ScalableClassicalOrthoPoly1D() {delete poly_;} inline long double location() const {return location_;} inline long double scale() const {return scale_;} inline void setLocation(const long double v) {location_ = v;} inline void setScale(const long double v) { if (v <= 0.0) throw std::invalid_argument( "In npstat::ScalableClassicalOrthoPoly1D::setScale: " "scale parameter must be positive"); scale_ = v; } inline long double weight(const long double x) const {return poly_->weight((x - location_)/scale_)/scale_;} inline double xmin() const {return scale_*poly_->xmin() + location_;} inline double xmax() const {return scale_*poly_->xmax() + location_;} inline unsigned maxDegree() const {return poly_->maxDegree();} inline long double poly(const unsigned deg, const long double x) const {return poly_->poly(deg, (x - location_)/scale_);} /** // Values of two orthonormal polynomials. // Faster than calling "poly" two times. */ inline std::pair twopoly( const unsigned deg1, const unsigned deg2, const long double x) const {return poly_->twopoly(deg1, deg2, (x - location_)/scale_);} /** // Values of all orthonormal polynomials up to some degree. // Faster than calling "poly" multiple times. The size of // the "values" array should be at least maxdeg + 1. */ inline void allpoly(const long double x, long double* values, const unsigned maxdeg) const {poly_->allpoly((x - location_)/scale_, values, maxdeg);} inline double series(const double* coeffs, const unsigned maxdeg, const double x) const {return poly_->series(coeffs, maxdeg, (x - location_)/scale_);} inline double integrateSeries(const double* coeffs, const unsigned maxdeg) const {return scale_*poly_->integrateSeries(coeffs, maxdeg);} /** // Build the coefficients of the orthogonal polynomial series // for the given function. The length of the array "coeffs" // should be at least maxdeg + 1. Note that the coefficients // are returned in the order of increasing degree (same order // is used by the "series" function). */ template void calculateCoeffs(const Functor& fcn, const Quadrature& quad, double* coeffs, unsigned maxdeg) const; /** // Build the coefficients of the orthogonal polynomial series // for the given sample of points (empirical density function). // The length of the array "coeffs" should be at least maxdeg + 1. // Note that the coefficients are returned in the order of // increasing degree (same order is used by the "series" function). */ template inline void sampleCoeffs(const Numeric* coords, const unsigned long lenCoords, double* coeffs, const unsigned maxdeg) const { const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); poly_->sampleCoeffs(coords, lenCoords, mu, s, coeffs, maxdeg); } template inline void sampleCoeffVars(const Numeric* coords, const unsigned long lenCoords, const double* coeffs, const unsigned maxdeg, double* variances) const { const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); poly_->sampleCoeffVars(coords, lenCoords, mu, s, coeffs, maxdeg, variances); } template inline npstat::Matrix sampleCoeffCovariance(const Numeric* coords, const unsigned long lenCoords, const double* coeffs, const unsigned maxdeg) const { const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); return poly_->sampleCoeffCovariance(coords, lenCoords, mu, s, coeffs, maxdeg); } /** // Build the coefficients of the orthogonal polynomial series for // the given sample of weighted points (empirical density function). // The first element of the pair will be treated as the coordinate // and the second element will be treated as weight. Weights must // not be negative. The length of the array "coeffs" should be // at least maxdeg + 1. Note that the coefficients are returned // in the order of increasing degree (same order is used by the // "series" function). */ template inline void weightedSampleCoeffs(const Pair* points, const unsigned long numPoints, double* coeffs, const unsigned maxdeg) const { typedef typename Pair::first_type Numeric; const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); return poly_->weightedSampleCoeffs(points, numPoints, mu, s, coeffs, maxdeg); } template inline void weightedSampleCoeffVars(const Pair* points, const unsigned long nPoints, const double* coeffs, const unsigned maxdeg, double* variances) const { typedef typename Pair::first_type Numeric; const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); return poly_->weightedSampleCoeffVars(points,nPoints,mu,s,coeffs,maxdeg,variances); } template inline npstat::Matrix weightedSampleCoeffCovariance(const Pair* points, const unsigned long nPoints, const double* coeffs, const unsigned maxdeg) const { typedef typename Pair::first_type Numeric; const Numeric mu = static_cast(location_); const Numeric s = static_cast(scale_); return poly_->weightedSampleCoeffCovariance(points, nPoints, mu, s, coeffs, maxdeg); } private: AbsClassicalOrthoPoly1D* poly_; long double location_; long double scale_; }; } #include "npstat/nm/ScalableClassicalOrthoPoly1D.icc" #endif // NPSTAT_SCALABLECLASSICALORTHOPOLY1D_HH_