Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00011 #include "fvar.hpp"
00012
00017 double colsum(const dmatrix& m, int col)
00018 {
00019 if (col<m.rowmin() || col>m.rowmax())
00020 {
00021 cerr << "Row out of bounds in function"
00022 " colsum(const imatrix& m,int col)" << endl;
00023 ad_exit(1);
00024 }
00025 double isum=0;
00026 int mmin=m.rowmin();
00027 int mmax=m.rowmax();
00028 for (int i=mmin;i<=mmax;i++)
00029 {
00030 isum+=m(i,col);
00031 }
00032 return isum;
00033 }