STK++ 1.0
STK_AdditiveBSplineCoefficients.h
Go to the documentation of this file.
00001 /*--------------------------------------------------------------------*/
00002 /*     Copyright (C) 2004-2010  Serge Iovleff
00003 
00004  This program is free software; you can redistribute it and/or modify
00005  it under the terms of the GNU Lesser General Public License as
00006  published by the Free Software Foundation; either version 2 of the
00007  License, or (at your option) any later version.
00008 
00009  This program is distributed in the hope that it will be useful,
00010  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  GNU Lesser General Public License for more details.
00013 
00014  You should have received a copy of the GNU Lesser General Public
00015  License along with this program; if not, write to the
00016  Free Software Foundation, Inc.,
00017  59 Temple Place,
00018  Suite 330,
00019  Boston, MA 02111-1307
00020  USA
00021 
00022  Contact : Serge.Iovleff@stkpp.org
00023  */
00024 
00025 /*
00026  * Project:  stkpp::Regress
00027  * created on: 25 juin 2010
00028  * Purpose:  Compute the coefficients of an additive B-Spline manifold.
00029  * Author:   iovleff, serge.iovleff@stkpp.org
00030  **/
00031 
00036 #ifndef STK_ADDITIVEBSPLINECOEFFICIENTS_H
00037 #define STK_ADDITIVEBSPLINECOEFFICIENTS_H
00038 
00039 #include "../../Sdk/include/STK_IRunner.h"
00040 #include "STK_BSplineCoefficients.h"
00041 
00042 namespace STK
00043 {
00044 
00056 class AdditiveBSplineCoefficients : public IRunnerBase
00057 {
00058   public:
00066     AdditiveBSplineCoefficients( Matrix const* p_data
00067                                , Integer const& nbControlPoints
00068                                , Integer const& degree = 3
00069                                , BSplineCoefficients::KnotsPosition const& position = BSplineCoefficients::uniform_
00070                                );
00071 
00073     virtual ~AdditiveBSplineCoefficients();
00074 
00081     void setData( Matrix const* p_data
00082                 , Integer const& nbControlPoints
00083                 , Integer const& degree = 3
00084                 , BSplineCoefficients::KnotsPosition const& position = BSplineCoefficients::uniform_
00085                 );
00086 
00088     bool run();
00089 
00091     inline Integer const& degree() const { return degree_;}
00093     inline Integer const& nbKnots() const { return nbKnots_;}
00095     inline Integer const& nbControlPoints() const { return nbControlPoints_;}
00099     inline Matrix const& coefficients() const { return coefficients_;}
00100 
00101   protected:
00103     Matrix const* p_data_;
00105     Integer nbKnots_;
00107     Integer nbControlPoints_;
00109     Integer degree_;
00111     BSplineCoefficients::KnotsPosition position_;
00113     Matrix coefficients_;
00114 };
00115 
00116 }
00117 
00118 #endif /* STK_BSPLINECOEFFICIENTS_H */