Home | History | Annotate | Download | only in examples

Lines Matching refs:vec

34 T mag2(const std::vector<T> & vec)
37 for (size_t k=0;k<vec.size();++k)
38 out += mag2(vec[k]);
43 T mag2(const std::vector<std::complex<T> > & vec)
46 for (size_t k=0;k<vec.size();++k)
47 out += mag2(vec[k]);
61 void RandomFill(std::vector<T> & vec)
63 for (size_t k=0;k<vec.size();++k)
64 vec[k] = T( rand() )/T(RAND_MAX) - .5;
68 void RandomFill(std::vector<std::complex<T> > & vec)
70 for (size_t k=0;k<vec.size();++k)
71 vec[k] = std::complex<T> ( T( rand() )/T(RAND_MAX) - .5, T( rand() )/T(RAND_MAX) - .5);