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