Statistics
| Revision:

root / branches / pthreads-737 / docs / manuals / autodif / savepar.cpp @ 765

History | View | Annotate | Download (564 Bytes)

1
\begin{lstlisting}
2
//file: savepar.cpp
3

    
4
#include <fvar.hpp>
5
#include "mixture.h"
6

    
7
void save_pars(dvar_vector& p,dvar_vector& mu,dvar_vector& sd,
8
    dvector& mumin, dvector& mumax,dvector& sdmin, dvector& sdmax,
9
    ivector& control)
10
{
11
  ofstream outfile("mixture.par");
12
  outfile << p.size() << "\n"; // The number of groups
13
  outfile << control << "\n";
14
  outfile << p << "\n\n";
15
  outfile << mu << "\n\n";
16
  outfile << sd << "\n\n";
17
  outfile << mumin << "\n\n";
18
  outfile << mumax << "\n\n";
19
  outfile << sdmin << "\n\n";
20
  outfile << sdmax;
21
}
22
\end{lstlisting}