Class BasisFunctionGenerator


  • public class BasisFunctionGenerator
    extends Object
    Generator for a set of basis functions.
    • Constructor Detail

      • BasisFunctionGenerator

        public BasisFunctionGenerator()
    • Method Detail

      • generateSet

        public List<Function<Double,​Double>> generateSet​(BasisFunctionKnots knots)
        Generate a set of b-splines with a given polynomial degree on the specified knots.
        Parameters:
        knots - holder for the knots and degree
        Returns:
        a List of functions
      • generateSet

        public List<Function<double[],​Double>> generateSet​(BasisFunctionKnots[] knots)
        Generate a set of N-dimensional b-splines as the produce of 1-dimensional b-splines with a given polynomial degree. on the specified knots
        Parameters:
        knots - holder for the knots and degree in each dimension
        Returns:
        a List of functions
      • generate

        protected Function<Double,​Double> generate​(BasisFunctionKnots data,
                                                         int index)
        Generate the i^th basis function
        Parameters:
        data - Container for the knots and degree of the basis function
        index - The index (from zero) of the function. Must be in range 0 to data.getNumSplines() (exclusive) For example if the degree is 1, and index is 0, this will cover the first three knots.
        Returns:
        The i^th basis function