class BasisSplineVolatilityTermStructureProvider implements VolatilitySurfaceProvider {

  @Override
  public VolatilitySurface getVolSurface(final DoubleMatrix1D modelParameters) {
    ArgumentChecker.notNull(modelParameters, "modelParameters");
    //BasisFunctionAggregation checks length of modelParameters
    final Function1D<Double, Double> func = new BasisFunctionAggregation<>(_bSplines, modelParameters.getData());

    final Function2D<Double, Double> func2D = new Function2D<Double, Double>() {
      @Override
      public Double evaluate(final Double t, final Double k) {
        return func.evaluate(t);
      }
    };

    final FunctionalDoublesSurface surface = new FunctionalDoublesSurface(func2D);
    return new VolatilitySurface(surface);
  }

  public  BasisSplineVolatilityTermStructureProvider(final List<Function1D<Double, Double>> bSlines);
  public  BasisSplineVolatilityTermStructureProvider(final double t1, final double t2, final int nKnots, final int degree);

}