ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
param_init_bounded_number_matrix Class Reference

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...

#include <param_init_bounded_number_matrix.h>

Public Member Functions

 param_init_bounded_number_matrix ()
 Default constructor. More...
 
 param_init_bounded_number_matrix (const param_init_bounded_number_matrix &)
 
virtual ~param_init_bounded_number_matrix ()
 Destructor. More...
 
void allocate (int rowmin, int rowmax, int colmin, int colmax, const dmatrix &bmin, const dmatrix &bmax, const char *s)
 Allocate matrix of param_init_bounded numbers with dimension [rowmin to rowmax] x [colmin to colmax] with bounded values [bmin, bmax]. More...
 
void allocate (int rowmin, int rowmax, int colmin, int colmax, const dmatrix &bmin, const dmatrix &bmax, const imatrix &phase_start, const char *s)
 Allocate matrix of param_init_bounded numbers with dimension [rowmin to rowmax] x [colmin to colmax] with bounded values [bmin, bmax]. More...
 
bool allocated () const
 Returns true is allocated, otherwise false. More...
 
dmatrix get_scalefactor () const
 Returns matrix with scalefactors for each element in param_init_bounded_number_matrix. More...
 
int indexmax () const
 Returns upper row index. More...
 
int indexmin () const
 Returns lower row index. More...
 
param_init_bounded_number_vectoroperator() (const int i) const
 Returns param_init_bounded_vector for index i. More...
 
param_init_bounded_numberoperator() (const int i, const int j) const
 Returns param_init_bounded_number at index i and j. More...
 
param_init_bounded_number_vectoroperator[] (const int i) const
 Returns param_init_bounded_vector for index i. More...
 
void set_scalefactor (const double scalefactor)
 Set scalefactor for each element of param_init_bounded_number_matrix. More...
 
void set_scalefactor (const dmatrix &scalefactor)
 Set scalefactor for each element of param_init_bounded_number_matrix. More...
 

Private Member Functions

void deallocate ()
 Free allocated memory. More...
 

Private Attributes

int index_max
 
int index_min
 
param_init_bounded_number_vectorv
 

Detailed Description

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

ADModelbuilder and associated libraries and documentations are provided under the general terms of the "BSD" license.

License:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the University of California, Otter Research, nor the ADMB Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 46 of file param_init_bounded_number_matrix.h.

Constructor & Destructor Documentation

param_init_bounded_number_matrix::param_init_bounded_number_matrix ( )

Default constructor.

Definition at line 14 of file param_init_bounded_number_matrix.cpp.

param_init_bounded_number_matrix::param_init_bounded_number_matrix ( const param_init_bounded_number_matrix )
param_init_bounded_number_matrix::~param_init_bounded_number_matrix ( )
virtual

Destructor.

Definition at line 21 of file param_init_bounded_number_matrix.cpp.

Member Function Documentation

void param_init_bounded_number_matrix::allocate ( int  rowmin,
int  rowmax,
int  colmin,
int  colmax,
const dmatrix bmin,
const dmatrix bmax,
const char *  s 
)

Allocate matrix of param_init_bounded numbers with dimension [rowmin to rowmax] x [colmin to colmax] with bounded values [bmin, bmax].

Note: default phase_start is 1.

Parameters
rowminmatrix row minimum index
rowmaxmatrix row max index
colminmatrix column minimum index
colmaxmatrix column max index
bminbounded lower values
bmaxbounded upper values
sid

Definition at line 40 of file param_init_bounded_number_matrix.cpp.

void param_init_bounded_number_matrix::allocate ( int  rowmin,
int  rowmax,
int  colmin,
int  colmax,
const dmatrix bmin,
const dmatrix bmax,
const imatrix phase_start,
const char *  s 
)

Allocate matrix of param_init_bounded numbers with dimension [rowmin to rowmax] x [colmin to colmax] with bounded values [bmin, bmax].

Note: default phase_start is 1.

Parameters
rowminmatrix row minimum index
rowmaxmatrix row max index
colminmatrix column minimum index
colmaxmatrix column max index
bminbounded lower values
bmaxbounded upper values
phase_start
sid

Definition at line 66 of file param_init_bounded_number_matrix.cpp.

bool param_init_bounded_number_matrix::allocated ( void  ) const
inline

Returns true is allocated, otherwise false.

Definition at line 74 of file param_init_bounded_number_matrix.h.

void param_init_bounded_number_matrix::deallocate ( void  )
private

Free allocated memory.

Definition at line 157 of file param_init_bounded_number_matrix.cpp.

Referenced by ~param_init_bounded_number_matrix().

dmatrix param_init_bounded_number_matrix::get_scalefactor ( void  ) const

Returns matrix with scalefactors for each element in param_init_bounded_number_matrix.

Definition at line 139 of file param_init_bounded_number_matrix.cpp.

int param_init_bounded_number_matrix::indexmax ( void  ) const
inline

Returns upper row index.

Definition at line 80 of file param_init_bounded_number_matrix.h.

Referenced by dvar_matrix::dvar_matrix().

int param_init_bounded_number_matrix::indexmin ( void  ) const
inline

Returns lower row index.

Definition at line 77 of file param_init_bounded_number_matrix.h.

Referenced by dvar_matrix::dvar_matrix().

param_init_bounded_number_vector & param_init_bounded_number_matrix::operator() ( const int  i) const

Returns param_init_bounded_vector for index i.

Bounds checking is performed.

Parameters
iindex

Definition at line 202 of file param_init_bounded_number_matrix.cpp.

Referenced by operator()().

param_init_bounded_number & param_init_bounded_number_matrix::operator() ( const int  i,
const int  j 
) const

Returns param_init_bounded_number at index i and j.

Bounds checking is performed.

Parameters
irow index
jcolumn index

Definition at line 228 of file param_init_bounded_number_matrix.cpp.

param_init_bounded_number_vector & param_init_bounded_number_matrix::operator[] ( const int  i) const

Returns param_init_bounded_vector for index i.

Bounds checking is performed.

Parameters
iindex

Definition at line 177 of file param_init_bounded_number_matrix.cpp.

void param_init_bounded_number_matrix::set_scalefactor ( const double  scalefactor)

Set scalefactor for each element of param_init_bounded_number_matrix.

Parameters
scalefactordouble

Definition at line 106 of file param_init_bounded_number_matrix.cpp.

void param_init_bounded_number_matrix::set_scalefactor ( const dmatrix scalefactor)

Set scalefactor for each element of param_init_bounded_number_matrix.

scalefactor should have the same dimension as param_init_bounded_number_matrix.

Parameters
scalefactordmatrix

Definition at line 124 of file param_init_bounded_number_matrix.cpp.

Member Data Documentation

int param_init_bounded_number_matrix::index_max
private
int param_init_bounded_number_matrix::index_min
private
param_init_bounded_number_vector* param_init_bounded_number_matrix::v
private

The documentation for this class was generated from the following files: