35#include "../bfl_err.h"
36#include "../wrappers/matrix/vector_wrapper.h"
37#include "../wrappers/matrix/matrix_wrapper.h"
47 template <
typename T>
class Sample
59 Sample (
unsigned int dimension = 0);
65 Sample (
const Sample<T> & my_sample );
71 const T& ValueGet ( )
const;
74 unsigned int DimensionGet ()
const;
77 void DimensionSet (
unsigned int dim);
83 void ValueSet (
const T& value );
90 template <
typename S>
friend ostream & operator<< (ostream & stream,
93 template <
typename S>
friend istream & operator>> (istream & stream,
113 template <
typename T> Sample<T>::~Sample( )
118 template <
typename T> Sample<T>::Sample (
const Sample & my_sample )
120 Value = my_sample.ValueGet();
125 template <
typename T>
void Sample<T>::ValueSet (
const T& value)
132 template <
typename T> T& Sample<T>::ValueGet ( )
139 template <
typename T>
const T& Sample<T>::ValueGet ( )
const
145 template <
typename T>
unsigned int Sample<T>::DimensionGet ( )
const
151 template <
typename T>
void Sample<T>::DimensionSet (
unsigned int dim)
155 template <
typename S> ostream & operator<< (ostream & stream, Sample<S> & my_sample)
157 stream << my_sample.ValueGet() << endl;
161 template <
typename S> istream & operator>> (istream & stream, Sample<S> & my_sample)
165 my_sample.ValueSet(value);
170 template <
typename T> Sample<T> & Sample<T>::operator= (
const Sample<T> & my_sample)
172 Value = my_sample.ValueGet();