Exemple #1
0
/**
Return a matrix from d3_array indexed at i.

\param i int
*/
dmatrix& d3_array::operator()(int i)
{
  if (i < slicemin())
  {
    ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
      "dmatrix& d3_array::operator()(int i)", indexmin(), indexmax(), i);
  }
  if (i > slicemax())
  {
    ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too high",
      "dmatrix& d3_array::operator()(int i)", indexmin(), indexmax(), i);
  }
   return t[i];
}
Exemple #2
0
/**
Return a vector from d3_array indexed at i and j.

\param i int
\param j int
\param k int
*/
dvector& d3_array::operator()(int i, int j)
{
  if (i < slicemin())
  {
    ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- slice index too low",
      "dmatrix& d3_array::operator()(int i, int j)",
      slicemin(), slicemax(), i);
  }
  if (i > slicemax())
  {
    ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- slice index too high",
      "dmatrix& d3_array::operator()(int i, int j)",
      slicemin(), slicemax(), i);
  }
  return (elem(i))(j);
}
Exemple #3
0
/**
 * Description not yet available.
 * \param
 */
    i3_array& i4_array::operator [] (int i)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
        "i3_array& i4_array::operator [] (int i)", indexmin(), indexmax(), i);
      }
      return t[i];
    }
Exemple #4
0
/**
 * Description not yet available.
 * \param
 */
    dvar_vector& dvar6_array::operator ( ) (int i,int j,int k,int l,int m)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
      "dvar_vector& dvar6_array::operator()(int i, int j, int k, int l, int m)",
        indexmin(), indexmax(), i);
      }
      return elem(i)(j,k,l,m);
    }
Exemple #5
0
/**
 * Description not yet available.
 * \param
 */
    dvar3_array& dvar6_array::operator ( ) (int i,int j,int k)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
        "dvar5_array& dvar6_array::operator()(int i, int j, int k)",
        indexmin(), indexmax(), i);
      }
      return elem(i)(j,k);
    }
Exemple #6
0
/**
 * Description not yet available.
 * \param
 */
    dvar5_array& dvar6_array::operator ( ) (int i)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("index out of bounds",
        "dvar5_array& dvar6_array::operator()(int i)",
        indexmin(), indexmax(), i);
      }
      return t[i];
    }
Exemple #7
0
/**
 * Description not yet available.
 * \param
 */
    d3_array& d5_array::operator ( ) (int i, int j)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
        "d3_array& d5_array::operator[](int i, int j)",
        indexmin(), indexmax(), i);
      }
      return elem(i)(j);
    }
Exemple #8
0
/**
 * Description not yet available.
 * \param
 */
    d4_array& d5_array::operator ( ) (int i)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("index out of bounds",
        "d4_array& d5_array::operator()(int i)", indexmin(), indexmax(), i);
      }
      //return t[i];
      return elem(i);
    }
param_init_bounded_number_vector& param_init_bounded_number_matrix::operator()(
  const int i) const
{
#ifndef OPT_LIB
  if (i < index_min)
  {
    ADMB_ARRAY_BOUNDS_ERROR("Index too low",
    "param_init_bounded_number_matrix::operator[](const int i) const",
    index_min, index_max, i);
  }
  if (i > index_max)
  {
    ADMB_ARRAY_BOUNDS_ERROR("Index too high",
    "param_init_bounded_number_matrix::operator[](const int i) const",
    index_min, index_max, i);
  }
#endif
  return v[i];
}
Exemple #10
0
/**
 * Description not yet available.
 * \param
 */
    prevariable dvar6_array::operator ( ) (int i,int j,int k,int l,int m,
      int n)
    {
      if (i < indexmin() || i > indexmax())
      {
        ADMB_ARRAY_BOUNDS_ERROR("hslice index out of bounds",
"prevariable dvar6_array::operator()(int i, int j, int k, int l, int m, int n)",
        indexmin(), indexmax(), i);
      }
      return elem(i)(j,k,l,m,n);
    }