ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tensprod.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 
25  {
26  int lba=a.indexmin();
27  int lbb=b.indexmin();
28  int uba=a.indexmax();
29  int ubb=b.indexmax();
30  dvar_matrix ta=trans(a);
31  dvar_matrix tb=trans(b);
32  dvar_matrix c(lba,uba,lbb,ubb);
33  for (int i=lba;i<=lbb;i++)
34  for (int j=lbb;j<=ubb;j++)
35  c(i,j)=ta(i)*tb(j);
36  return c;
37  }
dmatrix trans(const dmatrix &m1)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat2.cpp:13
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvar_matrix tensor_prod(const dvar_matrix &a, const dvar_matrix &b)
The tensor product of two dvar_matrixes.
Definition: tensprod.cpp:24
int indexmax(void) const
Definition: fvar.hpp:2572
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
int indexmin(void) const
Definition: fvar.hpp:2568