STK++ 1.0
STK_LinearAAModel.h
Go to the documentation of this file.
00001 /*--------------------------------------------------------------------*/
00002 /*     Copyright (C) 2004  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  * Project:  stkpp::AAModels
00026  * Purpose:  class for AA Linear models.
00027  * Author:   Serge Iovleff, serge.iovleff@stkpp.org
00028  **/
00029 
00034 #ifndef STK_LINEARAAMODEL_H
00035 #define STK_LINEARAAMODEL_H
00036 
00037 #include "STK_GaussianAAModel.h"
00038 #include "../../Sdk/include/STK_IRunner.h"
00039 #include "../../Reduct/include/STK_ILinearReduct.h"
00040 
00041 namespace STK
00042 {
00043 
00044 namespace Law
00045 {
00046 template<class TYPE>
00047 class ITUnivariate;
00048 }
00049 
00087 class LinearAAModel : public IRunnerConstRef<Matrix>
00088                     , public GaussianAAModel
00089 {
00090   public :
00091     typedef IRunnerConstRef<Matrix> Runner;
00096     LinearAAModel( Matrix const& data);
00107     bool run( Integer const& dim);
00108 
00122     bool run( Vector const& weights, Integer const& dim);
00123 
00135     virtual bool run();
00136 
00150     virtual bool run(Vector const& weights);
00151 
00153     virtual ~LinearAAModel();
00154 
00169     static void simul( const Law::ITUnivariate<Real>& law
00170                      , Vector const& mu
00171                      , Real const& std
00172                      , Matrix& proj
00173                      , Matrix& data
00174                      );
00175     protected:
00177       Matrix workData_;
00178 };
00179 
00180 } // Namespace STK
00181 
00182 #endif // STK_LINEARAAMODEL_H