STK++ 0.9.13
STK_IMultiParameters.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2015 Serge Iovleff, Université Lille 1, Inria
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::StatModels
27 * created on: 22 juil. 2011
28 * Purpose: define the class IMultiStatModel.
29 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
30 **/
31
36#ifndef STK_IMULTIPARAMETERS_H
37#define STK_IMULTIPARAMETERS_H
38
39#include <STKernel.h>
40
41namespace STK
42{
43
47template<class Parameters>
48class IMultiParameters: public IRecursiveTemplate<Parameters>
49{
50 protected:
52 inline IMultiParameters(): range_() {}
58 inline IMultiParameters(IMultiParameters const& param): range_(param.range_) {}
61
62 public:
64 inline Range const& range() const { return range_;}
69 inline void resize( Range const& range)
70 { if (range != range_)
71 { range_ = range;
72 this->asDerived().resizeImpl(range);
73 }
74 }
75
76 private:
78};
79
80} // namespace STK
81
82#endif /* STK_IMULTIPARAMETERS_H */
This file include all the header files of the project STKernel.
Interface base class for the parameters of a multivariate model.
IMultiParameters()
default constructor.
Range const & range() const
void resize(Range const &range)
resize the parameters only if the range is modified, otherwise, stay with the current values.
IMultiParameters(Range const &range)
constructor with specified range
IMultiParameters(IMultiParameters const &param)
copy constructor.
Interface base class for all classes implementing the curious recursive template paradigm.
Parameters & asDerived()
static cast : return a reference of this with a cast to the derived class.
Index sub-vector region: Specialization when the size is unknown.
Definition STK_Range.h:265
The namespace STK is the main domain space of the Statistical ToolKit project.