Commit 7cb946de authored by Davis King's avatar Davis King
Browse files

Renamed all the rand::kernel_1a and rand::float_1a declarations

to just say rand.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404250
parent 98045930
......@@ -1188,7 +1188,7 @@ namespace dlib
assignment v;
dlib::rand::float_1a rnd;
dlib::rand rnd;
matrix<double,1> samples;
};
......
......@@ -82,7 +82,7 @@ namespace dlib
std::vector<sample_pair, alloc> edges;
edges.reserve(num);
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
rnd.set_seed(cast_to_string(random_seed));
// randomly sample a bunch of edges
......@@ -211,7 +211,7 @@ namespace dlib
std::vector<sample_pair, alloc> temp;
temp.reserve(num);
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
rnd.set_seed(cast_to_string(random_seed));
// randomly sample a bunch of edges
......
......@@ -362,7 +362,7 @@ namespace dlib
matrix<double> w3m;
rand::float_1a rand_nums;
rand rand_nums;
// temporary storage
mutable matrix<double> e1, e2, e3;
......
......@@ -15,7 +15,7 @@ namespace dlib
{
template <
typename T,
typename Rand_type = dlib::rand::kernel_1a
typename Rand_type = dlib::rand
>
class random_subset_selector
{
......
......@@ -12,7 +12,7 @@ namespace dlib
{
template <
typename T,
typename Rand_type = dlib::rand::kernel_1a
typename Rand_type = dlib::rand
>
class random_subset_selector
{
......
......@@ -484,7 +484,7 @@ namespace dlib
const vector_type& samples
)
{
dlib::rand::float_1a rnd;
dlib::rand rnd;
impl::fill_lisf(lisf, vector_to_matrix(samples),rnd, 2000);
}
......@@ -515,7 +515,7 @@ namespace dlib
const int sampling_size = 2000
)
{
dlib::rand::float_1a rnd;
dlib::rand rnd;
rnd.set_seed(cast_to_string(random_seed));
impl::fill_lisf(lisf, vector_to_matrix(samples), rnd, sampling_size);
}
......
......@@ -544,7 +544,7 @@ namespace dlib
typedef typename decision_function<kernel_type>::sample_vector_type sample_vector_type;
typedef typename decision_function<kernel_type>::scalar_vector_type scalar_vector_type;
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
trainer_type my_trainer(trainer);
......@@ -594,7 +594,7 @@ namespace dlib
typedef typename decision_function<kernel_type>::sample_vector_type sample_vector_type;
typedef typename decision_function<kernel_type>::scalar_vector_type scalar_vector_type;
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
// make a caching kernel
typedef caching_kernel<kernel_type, in_sample_vector_type> ckernel_type;
......
......@@ -772,7 +772,7 @@ namespace dlib
U& u
)
{
rand::kernel_1a r;
rand r;
randomize_samples(t,u,r);
}
......@@ -846,7 +846,7 @@ namespace dlib
T& t
)
{
rand::kernel_1a r;
rand r;
randomize_samples(t,r);
}
......
......@@ -422,7 +422,7 @@ namespace dlib
// we will use a linearly_independent_subset_finder to store our basis set.
linearly_independent_subset_finder<kernel_type> lisf(get_kernel(), max_basis_size);
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
// first pick the initial basis set randomly
for (unsigned long i = 0; i < 10*initial_basis_size && lisf.size() < initial_basis_size; ++i)
......
......@@ -33,7 +33,7 @@ namespace
- runs tests on array for compliance with the specs
!*/
{
dlib::rand::kernel_1a rnd;
dlib::rand rnd;
array a1, a2;
......
......@@ -27,7 +27,7 @@ namespace dlib
board_dimension squares on each side.
!*/
{
static dlib::rand::float_1a rnd;
static dlib::rand rnd;
x.clear();
y.clear();
......
......@@ -38,7 +38,7 @@ namespace
}
time_t thetime;
dlib::rand::float_1a rnd;
dlib::rand rnd;
template <typename dpca_type>
void test1()
......
......@@ -37,7 +37,7 @@ namespace
}
time_t thetime;
dlib::rand::float_1a rnd;
dlib::rand rnd;
template <typename T>
void validate (
......
......@@ -38,7 +38,7 @@ namespace
}
time_t thetime;
dlib::rand::float_1a rnd;
dlib::rand rnd;
void test_projection_error()
{
......
......@@ -329,7 +329,7 @@ namespace
std::vector< dlib::vector<double> > a;
dlib::vector<double> v;
dlib::rand::float_1a rnd;
dlib::rand rnd;
for (int i = 0; i < 10; ++i)
{
......
......@@ -449,7 +449,7 @@ namespace
void test_integral_image (
)
{
dlib::rand::float_1a rnd;
dlib::rand rnd;
array2d<unsigned char>::kernel_1a_c img;
integral_image int_img;
......
......@@ -37,7 +37,7 @@ namespace
seed = 1;
}
dlib::rand::float_1a rnd;
dlib::rand rnd;
unsigned long seed;
......
......@@ -734,7 +734,7 @@ namespace
a.set_size(1000,10);
b.set_size(1000,10);
i.set_size(1000,10);
dlib::rand::float_1a rnd;
dlib::rand rnd;
for (long r = 0; r < a.nr(); ++r)
{
for (long c = 0; c < a.nc(); ++c)
......
......@@ -25,7 +25,7 @@ namespace
logger dlog("test.matrix2");
dlib::rand::float_1a rnd;
dlib::rand rnd;
void matrix_test (
)
......
......@@ -87,7 +87,7 @@ namespace
}
template <typename type>
type rnd_num (dlib::rand::float_1a& rnd)
type rnd_num (dlib::rand& rnd)
{
return static_cast<type>(10*rnd.get_random_double());
}
......@@ -99,7 +99,7 @@ namespace
// It does this by performing an assignment that is subject to BLAS bindings and comparing the
// results directly to an unevaluated matrix_exp that should be equal.
dlib::rand::float_1a rnd;
dlib::rand rnd;
matrix<type> a(rows,cols), temp, temp2, temp3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment