ADMB Documentation  11.1.2274
 All Classes Files Functions Variables Typedefs Friends Defines
df1b2f16.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: df1b2f16.cpp 1919 2014-04-22 22:02:01Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <df1b2fun.h>
00012 
00017   ostream& operator << (const ostream& _os, const df1b2variable& _x)
00018   {
00019     ADUNCONST(df1b2variable,x)
00020     ADUNCONST(ostream,os)
00021     os << *x.u;
00022    /*
00023     os << dvector(df1b2variable::nvar,x.u_dot+1) << endl;
00024     os << dvector(df1b2variable::nvar,x.u_bar+1) << endl;
00025     os << dvector(df1b2variable::nvar,x.u_dot_bar+1) << endl;
00026    */
00027     return os;
00028   }
00029 
00034   ostream& operator << (const ostream& _os, const df1b2vector& _x)
00035   {
00036     ADUNCONST(ostream,os)
00037     ADUNCONST(df1b2vector,x)
00038     int mmin=x.indexmin();
00039     int mmax=x.indexmax();
00040     for (int i=mmin;i<=mmax;i++)
00041     {
00042       os << x(i) << " ";
00043     }
00044     return os;
00045   }
00046 
00051   ostream& operator << (const ostream& _os, const df1b2matrix& _x)
00052   {
00053     ADUNCONST(ostream,os)
00054     ADUNCONST(df1b2matrix,x)
00055     int mmin=x.indexmin();
00056     int mmax=x.indexmax();
00057     for (int i=mmin;i<=mmax;i++)
00058     {
00059       os << x(i) << " ";
00060       if (i<mmax) os << endl;
00061     }
00062     return os;
00063   }
00064 
00069   ostream& operator << (const ostream& _os, const df1b2_init_number_vector& _x)
00070   {
00071     ADUNCONST(ostream,os)
00072     ADUNCONST(df1b2_init_number_vector,x)
00073     int mmin=x.indexmin();
00074     int mmax=x.indexmax();
00075     for (int i=mmin;i<=mmax;i++)
00076     {
00077       os << x(i) << " ";
00078     }
00079     return os;
00080   }
00081 
00086   ostream& operator << (const ostream& _os,
00087     const df1b2_init_bounded_number_vector& _x)
00088   {
00089     ADUNCONST(ostream,os)
00090     ADUNCONST(df1b2_init_number_vector,x)
00091     int mmin=x.indexmin();
00092     int mmax=x.indexmax();
00093     for (int i=mmin;i<=mmax;i++)
00094     {
00095       os << x(i) << " ";
00096     }
00097     return os;
00098   }
00099 
00104   ostream& operator << (const ostream& _os,
00105     const init_df1b2vector& _x)
00106   {
00107     ADUNCONST(ostream,os)
00108     ADUNCONST(init_df1b2vector,x)
00109     int mmin=x.indexmin();
00110     int mmax=x.indexmax();
00111     for (int i=mmin;i<=mmax;i++)
00112     {
00113       os << x(i) << " ";
00114     }
00115     return os;
00116   }