Go to the documentation of this file.00001
00002 #ifndef bsta_io_von_mises_h_
00003 #define bsta_io_von_mises_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <bsta/bsta_von_mises.h>
00017 #include <bsta/bsta_parzen.h>
00018 #include <vsl/vsl_binary_io.h>
00019 #include <vnl/io/vnl_io_vector_fixed.h>
00020 #include <vcl_iostream.h>
00021
00022
00023 template <class T, unsigned n>
00024 void
00025 vsl_b_write(vsl_b_ostream &os, const bsta_von_mises<T,n>& vm)
00026 {
00027 vsl_b_write(os,vm.kappa());
00028
00029 vsl_b_write(os,vm.mean());
00030 }
00031
00032
00033 template <class T, unsigned n>
00034 void
00035 vsl_b_read(vsl_b_istream &is, bsta_von_mises<T,n>& vm)
00036 {
00037 typename bsta_parzen<T,n>::vector_type mean;
00038 T kappa;
00039 vsl_b_read(is, kappa);
00040 vsl_b_read(is, mean);
00041 vm.set_kappa(kappa);
00042 vm.set_mean(mean);
00043 }
00044
00045
00046 template <class T, unsigned n>
00047 void
00048 vsl_print_summary(vcl_ostream &os, const bsta_von_mises<T,n>& vm)
00049 {
00050 os << "von_mises mean:"<<vm.mean()<<" n_samples"<<vm.size();
00051 }
00052
00053
00054 #endif // bsta_io_von_mises_h_