46 #include "DenseLinAlgPack_random_vector.hpp"
47 #include "DenseLinAlgPack_DVectorClass.hpp"
49 void DenseLinAlgPack::seed_random_vector_generator(
unsigned int s )
54 void DenseLinAlgPack::random_vector( value_type l, value_type u, DVectorSlice* v )
57 throw std::invalid_argument(
"random_vector(...) : Error, "
58 "v can not be NULL" );
60 throw std::invalid_argument(
"random_vector(...) : Error, "
61 "l can not be greater than u" );
62 for( DVectorSlice::iterator itr = v->begin(); itr != v->end(); )
63 *itr++ = l + (
double(rand())/RAND_MAX) * (u -l);