ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lmat5.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
12 #include "fvar.hpp"
13 
19  {
20  if (rowmin() != m1.rowmin() || rowmax() != m1.rowmax() ||
21  colmin() != m1.colmin() || colmax() != m1.colmax() )
22  {
23  cerr << " Incompatible array bounds in "
24  "imatrix& operator = (const imatrix&)\n";
25  ad_exit(21);
26  }
27 
28  if (m != m1.m) // check for condition that both matrices
29  { // point to the same object
30  for (int i=rowmin();i<=rowmax();i++)
31  {
32  *(m+i) = m1[i];
33  }
34  }
35  return(*this);
36  }
37 
43  {
44  if (rowmin() != m1.rowmin() || rowmax() != m1.rowmax() ||
45  colmin() != m1.colmin() || colmax() != m1.colmax() )
46  {
47  cerr << " Incompatible array bounds in "
48  "imatrix& operator=(const imatrix&)\n";
49  ad_exit(21);
50  }
51 
52  for (int i=rowmin();i<=rowmax();i++)
53  {
54  *(m+i) = m1[i];
55  }
56  return(*this);
57  }
58 
int colmax(void) const
Definition: fvar.hpp:7588
Description not yet available.
Definition: imatrix.h:69
int rowmax(void) const
Definition: fvar.hpp:7596
lmatrix & operator=(const lmatrix &t)
Description not yet available.
Definition: lmat5.cpp:18
int rowmin() const
Definition: imatrix.h:146
exitptr ad_exit
Definition: gradstrc.cpp:53
Description not yet available.
Definition: fvar.hpp:7500
int rowmin(void) const
Definition: fvar.hpp:7592
int colmin(void) const
Definition: imatrix.h:155
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int colmax(void) const
Definition: imatrix.h:159
int colmin(void) const
Definition: fvar.hpp:7584
lvector * m
Definition: fvar.hpp:7503
int rowmax() const
Definition: imatrix.h:150