ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
param_init_bounded_number_matrix.h
Go to the documentation of this file.
00001 /*
00002  * $Id$
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  */
00041 #ifndef __param_init_bounded_number_matrix_h__
00042 #define __param_init_bounded_number_matrix_h__
00043 #include "admodel.h"
00044 
00048 class param_init_bounded_number_matrix
00049 {
00050 public:
00051   param_init_bounded_number_matrix();
00052   param_init_bounded_number_matrix(const param_init_bounded_number_matrix&);
00053   virtual ~param_init_bounded_number_matrix()
00054   {
00055     deallocate();
00056   }
00057 public:
00061   void allocate(int rowmin, int rowmax,
00062                 int colmin, int colmax,
00063                 const dmatrix& bmin, const dmatrix& bmax,
00064                 const char* s);
00068   void allocate(int rowmin, int rowmax,
00069                 int colmin, int colmax,
00070                 const dmatrix& bmin, const dmatrix& bmax,
00071                 const imatrix& phase_start,
00072                 const char* s);
00076   void set_scalefactor(const double scalefactor);
00080   void set_scalefactor(const dmatrix& scalefactor);
00084   dmatrix get_scalefactor() const;
00088   param_init_bounded_number_vector& operator[](const int i) const;
00092   param_init_bounded_number_vector& operator()(const int i) const;
00096   param_init_bounded_number& operator()(const int i, const int j) const;
00100   bool allocated() const { return v != NULL; }
00104   int indexmin() const { return index_min; }
00108   int indexmax() const { return index_max; }
00109 private:
00113   void deallocate();
00114 private:
00115   param_init_bounded_number_vector* v;
00116   int index_min;
00117   int index_max;
00118 /*
00119   void set_initial_value(const double_index_type& it);
00120 
00121   double_index_type* it;
00122 */
00123 };
00124 #endif