ADMB Documentation  11.1.1633
 All Classes Files Functions Variables Typedefs Friends Defines
adsplus.h
Go to the documentation of this file.
00001 /*
00002  * $Id: adsplus.h 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  *
00007  * ADModelbuilder and associated libraries and documentations are
00008  * provided under the general terms of the "BSD" license.
00009  *
00010  * License:
00011  *
00012  * Redistribution and use in source and binary forms, with or without
00013  * modification, are permitted provided that the following conditions are
00014  * met:
00015  *
00016  * 1. Redistributions of source code must retain the above copyright
00017  * notice, this list of conditions and the following disclaimer.
00018  *
00019  * 2.  Redistributions in binary form must reproduce the above copyright
00020  * notice, this list of conditions and the following disclaimer in the
00021  * documentation and/or other materials provided with the distribution.
00022  *
00023  * 3.  Neither the name of the  University of California, Otter Research,
00024  * nor the ADMB Foundation nor the names of its contributors may be used
00025  * to endorse or promote products derived from this software without
00026  * specific prior written permission.
00027  *
00028  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00029  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00030  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00031  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00032  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00033  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00034  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00035  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00036  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00037  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00038  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039  *
00040  */
00045 #ifndef _ADSPLUS_H_
00046   #define _ADSPLUS_H_
00047 #include <admodel.h>
00048 #include <spcomm.h>
00049 //#define DO_PROFILE
00050 #pragma interface
00051 //#include <admodhd.h>
00052 
00057 class SPparam_init_number: public param_init_number
00058 {
00059 public:
00060   SPparam_init_number(void ): param_init_number() {;}
00061 protected:
00062   void allocate(int phase_start=1,const char *s="UNNAMED");
00063   void allocate(const char *s="UNNAMED");
00064   friend class model_parameters;
00065 };
00066 
00071 class SPparam_init_vector: public param_init_vector
00072 {
00073 public:
00074   SPparam_init_vector(void ): param_init_vector() {;}
00075   void allocate(int phasestart=1,const char * s="UNNAMED");
00076   void allocate(const char * s="UNNAMED");
00077   friend class model_parameters;
00078 };
00079 
00084 class SPnamed_dvar_vector: public named_dvar_vector
00085 {
00086 public:
00087   SPnamed_dvar_vector(void ): named_dvar_vector() {;}
00088   SPnamed_dvar_vector& operator=(const dvar_vector& m);
00089   SPnamed_dvar_vector& operator=(const dvector& m);
00090   SPnamed_dvar_vector& operator = (CGNU_DOUBLE m);
00091   SPnamed_dvar_vector& operator=(const prevariable& m);
00092   friend class model_parameters;
00093   //void allocate(int mmin,int mmax,const char * s);
00094   ~SPnamed_dvar_vector(void ); //{SPsend(*this);}
00095 };
00096 
00101 class SPnamed_dvector: public named_dvector
00102 {
00103 public:
00104   SPnamed_dvector(void ): named_dvector() {;}
00105   SPnamed_dvector& operator=(const dvector& m);
00106   SPnamed_dvector& operator = (CGNU_DOUBLE m);
00107   friend class model_parameters;
00108   void allocate(int mmin,int mmax,const char * s);
00109   ~SPnamed_dvector(void ); //{SPsend(*this);}
00110 };
00111 
00116 class SPnamed_dvariable : public named_dvariable
00117 {
00118 protected:
00119   SPnamed_dvariable(void) : named_dvariable(){}
00120   SPnamed_dvariable& operator=(const prevariable& m);
00121   SPnamed_dvariable& operator = (CGNU_DOUBLE m);
00122   ~SPnamed_dvariable(void);
00123   friend class model_parameters;
00124 };
00125 
00130 class SPnamed_dvar_matrix : public named_dvar_matrix
00131 {
00132 protected:
00133   SPnamed_dvar_matrix(void) : named_dvar_matrix() {}
00134 public:
00135   SPnamed_dvar_matrix& operator = (CGNU_DOUBLE m);
00136   SPnamed_dvar_matrix& operator=(const dmatrix& m);
00137   SPnamed_dvar_matrix& operator=(const dvar_matrix& m);
00138   friend class model_parameters;
00139   ~SPnamed_dvar_matrix();
00140 };
00141 
00146 class SPnamed_dmatrix : public named_dmatrix
00147 {
00148 protected:
00149   SPnamed_dmatrix(void) : named_dmatrix() {}
00150 public:
00151   SPnamed_dmatrix& operator = (CGNU_DOUBLE m);
00152   SPnamed_dmatrix& operator=(const dmatrix& m);
00153   friend class model_parameters;
00154   ~SPnamed_dmatrix();
00155 };
00156 
00161 class SPparam_init_bounded_number: public param_init_bounded_number
00162 {
00163 public:
00164   SPparam_init_bounded_number(void ): param_init_bounded_number() {;}
00165 protected:
00166   void allocate(double _minb,double _maxb,int phase_start=1,
00167     const char * s="UNNAMED");
00168   void allocate(double _minb,double _maxb,const char * s="UNNAMED");
00169 };
00170 
00175 class SPparam_init_matrix: public param_init_matrix
00176 {
00177 public:
00178   SPparam_init_matrix(void ): param_init_matrix() {;}
00179 protected:
00180   void allocate(int phase_start=1,const char * = "UNNAMED");
00181   void allocate(const char * = "UNNAMED");
00182 };
00183 
00188 class SPparam_init_bounded_matrix: public param_init_bounded_matrix
00189 {
00190 public:
00191   SPparam_init_bounded_matrix(void ): param_init_bounded_matrix() {;}
00192 
00193 public:
00194 
00195   void allocate(double _minb,double _maxb,
00196     int phase_start=1,const char * = "UNNAMED");
00197   void allocate(double _minb,double _maxb,const char * = "UNNAMED");
00198 };
00199 
00204 class SPdata_int : public data_int
00205 {
00206 public:
00207   SPdata_int(void) : data_int() {;}
00208   void allocate(int n,const char * s="UNNAMED");
00209   void allocate(const char * s="UNNAMED");
00210 };
00211 
00216 class SPdata_matrix : public data_matrix
00217 {
00218 public:
00219   SPdata_matrix(void) : data_matrix() {;}
00220   void allocate(const char * = "UNNAMED");
00221 };
00222 
00227 class SPdata_3array : public data_3array
00228 {
00229 public:
00230   void allocate(int hsl,int hsu,int rmin,int rmax,int cmin,int cmax,
00231     const char * ="UNNAMED");
00232 /*
00233   void allocate(int hsl,int hsu, const ivector& rmin,int rmax,
00234     int cmin,int cmax,const char * ="UNNAMED");
00235   void allocate(int hsl,int hsu,int rmin, const ivector& rmax,
00236     int cmin,int cmax,const char * ="UNNAMED");
00237   void allocate(int hsl,int hsu, const ivector& rmin, const ivector& rmax,
00238     int cmin,int cmax,const char * ="UNNAMED");
00239   void allocate(int hsl,int hsu,int rmin,int rmax, const ivector& cmin,int cmax,
00240     const char * ="UNNAMED");
00241   void allocate(int hsl,int hsu,int rmin,int rmax, const ivector& cmin,
00242     const ivector& cmax,const char * ="UNNAMED");
00243   void allocate(int hsl,int hsu,int rmin,int rmax,int cmin,
00244     const ivector& cmax,const char * ="UNNAMED");
00245 */
00246 };
00247 
00252 class SPdata_4array : public data_4array
00253 {
00254 public:
00255   void allocate(int hhsl,int hhsu,int hsl,int hsu,int rmin,int rmax,
00256     int cmin,int cmax,const char * ="UNNAMED");
00257 };
00258 
00263 class SPdata_imatrix : public data_imatrix
00264 {
00265 public:
00266   //void allocate(int rmin,int rmax,int cmin,int cmax,const char * ="UNNAMED");
00267   void allocate(const char * ="UNNAMED");
00268 };
00269 
00274 class SPdata_vector : public data_vector
00275 {
00276 public:
00277   SPdata_vector(void) : data_vector() {;}
00278   void allocate(const char * ="UNNAMED");
00279 };
00280 
00285 class SPdata_ivector : public data_ivector
00286 {
00287 public:
00288   SPdata_ivector(void) : data_ivector() {;}
00289   void allocate(int imin,int imax,const char * ="UNNAMED");
00290 };
00291 
00296 class SPdata_number : public data_number
00297 {
00298 public:
00299   SPdata_number(void) : data_number() {;}
00300   void allocate(const char * ="UNNAMED");
00301 };
00302 
00307 class SPparam_init_bounded_vector: public param_init_bounded_vector
00308 {
00309 public:
00310   void allocate(double _minb,double _maxb,int phasestart=1,
00311    const char * name="UNNAMED");
00312   void allocate(double _minb,double _maxb,const char * name="UNNAMED");
00313 };
00314 
00315 #endif