ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
imat9.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  */
11 #include <fvar.hpp>
12 
17 int max(const imatrix & M)
18 {
19  int mmin=M.indexmin();
20  int mmax=M.indexmax();
21  int n1=max(M(mmin));
22  for (int i=mmin+1;i<=mmax;i++)
23  {
24  int n=max(M(i));
25  if (n1<n) n1=n;
26  }
27  return n1;
28 }
29 
34 int min(const imatrix & M)
35 {
36  int mmin=M.indexmin();
37  int mmax=M.indexmax();
38  int n1=min(M(mmin));
39  for (int i=mmin+1;i<=mmax;i++)
40  {
41  int n=min(M(i));
42  if (n1>n) n1=n;
43  }
44  return n1;
45 }
int indexmax() const
Definition: imatrix.h:142
Description not yet available.
Definition: imatrix.h:69
int indexmin() const
Definition: imatrix.h:138
#define min(a, b)
Definition: cbivnorm.cpp:188
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
#define M
Definition: rngen.cpp:57
#define max(a, b)
Definition: cbivnorm.cpp:189