32 #ifndef WEIGHTEDSAMPLE_H 33 #define WEIGHTEDSAMPLE_H 82 template <
typename S>
friend ostream &
operator<< (ostream & stream,
116 template <
typename S> ostream &
operator<< (ostream & stream,
119 stream <<
"WeightedSample Value = " << (
Sample<S> &) mws
120 <<
"Weight = " << mws.
Weight << endl;
124 template <
typename T> WeightedSample<T> & WeightedSample<T>::operator= (
const WeightedSample<T> & my_sample)
128 Sample<T> * op1;
const Sample<T> * op2;
129 op1 =
this; op2 = & my_sample;
131 this->Weight = my_sample.WeightGet();
136 template <
typename T> WeightedSample<T> & WeightedSample<T>::operator= (
const Sample<T> & my_sample)
139 Sample<T> * op1;
const Sample<T> * op2;
140 op1 =
this; op2 = & my_sample;
void WeightSet(double weight)
Set the weight.
virtual ~WeightedSample()
Destructor.
WeightedSample(int dimension=0)
Constructor.
double WeightGet() const
Get the weight.
friend ostream & operator<<(ostream &stream, WeightedSample< S > &mws)
Print a weighted sample.
WeightedSample< T > & operator=(const WeightedSample< T > &my_sample)
Operator =.
ostream & operator<<(ostream &stream, WeightedSample< S > &mws)