Home
last modified time | relevance | path

Searched refs:randInt (Results 1 – 25 of 33) sorted by relevance

12

/external/opencv3/modules/calib3d/test/
Dtest_undistort.cpp87 …matrix_type = types[INPUT][0] = types[OUTPUT][0]= types[REF_OUTPUT][0] = cvtest::randInt(rng)%2 ? … in get_test_array_types_and_sizes()
100 img_size.width = cvtest::randInt(rng) % MAX_X + 1; in prepare_test_case()
101 img_size.height = cvtest::randInt(rng) % MAX_Y + 1; in prepare_test_case()
103 center_principal_point = ((cvtest::randInt(rng) % 2)!=0); in prepare_test_case()
215 useCPlus = ((cvtest::randInt(rng) % 2)!=0); in get_test_array_types_and_sizes()
223 …types[INPUT][0] = types[OUTPUT][0] = types[REF_OUTPUT][0] = types[TEMP][0]= cvtest::randInt(rng)%2… in get_test_array_types_and_sizes()
225 types[INPUT][1] = cvtest::randInt(rng)%2 ? CV_64F : CV_32F; in get_test_array_types_and_sizes()
226 types[INPUT][2] = cvtest::randInt(rng)%2 ? CV_64F : CV_32F; in get_test_array_types_and_sizes()
227 types[INPUT][3] = cvtest::randInt(rng)%2 ? CV_64F : CV_32F; in get_test_array_types_and_sizes()
228 types[INPUT][4] = cvtest::randInt(rng)%2 ? CV_64F : CV_32F; in get_test_array_types_and_sizes()
[all …]
Dtest_modelest.cpp117 checkPartialSubsets = (cvtest::randInt(rng) % 2 == 0);
119 int pointsCount = cvtest::randInt(rng) % maxPointsCount;
120 usedPointsCount = pointsCount == 0 ? 0 : cvtest::randInt(rng) % pointsCount;
191 startPointIndex = cvtest::randInt(rng) % usedPointsCount;
192 endPointIndex = cvtest::randInt(rng) % usedPointsCount;
193 …modifiedPointIndex = checkPartialSubsets ? usedPointsCount - 1 : cvtest::randInt(rng) % usedPoints…
222 int modelPoints = cvtest::randInt(rng);
224 int maxBasicSolutions = cvtest::randInt(rng);
Dtest_fundam.cpp569 int depth = cvtest::randInt(rng) % 2 == 0 ? CV_32F : CV_64F; in get_test_array_types_and_sizes()
572 code = cvtest::randInt(rng) % 3; in get_test_array_types_and_sizes()
590 if( cvtest::randInt(rng) % 2 ) in get_test_array_types_and_sizes()
604 calc_jacobians = cvtest::randInt(rng) % 3 != 0; in get_test_array_types_and_sizes()
613 test_cpp = (cvtest::randInt(rng) & 256) == 0; in get_test_array_types_and_sizes()
832 int pt_depth = cvtest::randInt(rng) % 2 == 0 ? CV_32F : CV_64F; in get_test_array_types_and_sizes()
836 dims = cvtest::randInt(rng) % 2 + 2; in get_test_array_types_and_sizes()
837 method = 1 << (cvtest::randInt(rng) % 4); in get_test_array_types_and_sizes()
844 if( pt_count >= 8 && cvtest::randInt(rng) % 2 ) in get_test_array_types_and_sizes()
850 if( cvtest::randInt(rng) % 2 ) in get_test_array_types_and_sizes()
[all …]
Dtest_cornerssubpix.cpp137 …const int pattern_width = min_pattern_size + cvtest::randInt(rng) % (max_pattern_size - min_patter… in run()
138 …const int pattern_height = min_pattern_size + cvtest::randInt(rng) % (max_pattern_size - min_patte… in run()
/external/opencv3/modules/core/test/
Dtest_ds.cpp542 sseq->count = cvtest::randInt( rng ) % max_struct_size; in test_multi_create()
551 int k = cvtest::randInt( rng ) % cur_count; in test_multi_create()
557 int hdr_size = (cvtest::randInt(rng) % 10)*4 + sizeof(CvSeq); in test_multi_create()
561 if( cvtest::randInt(rng) % 2 ) in test_multi_create()
572 cvSetSeqBlockSize( writer[struct_idx].seq, cvtest::randInt( rng ) % 10000 ); in test_multi_create()
613 int idx = cvtest::randInt(rng) % (sseq->count*3) - sseq->count*3/2; in test_get_seq_elem()
656 int pos = cvtest::randInt(rng) % 2; in test_get_seq_reading()
672 int op = cvtest::randInt(rng) % max_val; in test_get_seq_reading()
680 new_pos = cvtest::randInt(rng) % (total*2) - total; in test_get_seq_reading()
746 struct_idx = cvtest::randInt(rng) % struct_count; in test_seq_ops()
[all …]
Dtest_io.cpp16 idx[j] = cvtest::randInt(rng) % sz[j]; in cvTsGetRandomSparseMat()
110 int test_int = (int)cvtest::randInt(rng); in run()
111 double test_real = (cvtest::randInt(rng)%2?1:-1)*exp(cvtest::randReal(rng)*18-9); in run()
114 int depth = cvtest::randInt(rng) % (CV_64F+1); in run()
115 int cn = cvtest::randInt(rng) % 4 + 1; in run()
116 … Mat test_mat(cvtest::randInt(rng)%30+1, cvtest::randInt(rng)%30+1, CV_MAKETYPE(depth, cn)); in run()
145 depth = cvtest::randInt(rng) % (CV_64F+1); in run()
146 cn = cvtest::randInt(rng) % 4 + 1; in run()
148 static_cast<int>(cvtest::randInt(rng)%10+1), in run()
149 static_cast<int>(cvtest::randInt(rng)%10+1), in run()
[all …]
Dtest_rand.cpp106 int depth = cvtest::randInt(rng) % (CV_64F+1); in run()
107 int c, cn = (cvtest::randInt(rng) % 4) + 1; in run()
109 int dist_type = cvtest::randInt(rng) % (CV_RAND_NORMAL+1); in run()
130 a = (int)(cvtest::randInt(rng) % (_ranges[depth][1] - in run()
134 b = (int)(cvtest::randInt(rng) % (_ranges[depth][1] - in run()
153 a = cvtest::randInt(rng) % meanrange - meanrange/2 + in run()
155 b = cvtest::randInt(rng) % (maxdiv - mindiv) + mindiv; in run()
171 dsz = slice+1 < maxSlice ? (int)(cvtest::randInt(rng) % (SZ - sz + 1)) : SZ - sz; in run()
255 int SDIM = cvtest::randInt(rng) % (MAX_SDIM-1) + 2; in run()
Dtest_math.cpp56 int depth = cvtest::randInt(rng)%2 + CV_32F; in get_test_array_types_and_sizes()
57 int cn = cvtest::randInt(rng) % 4 + 1, type = CV_MAKETYPE(depth, cn); in get_test_array_types_and_sizes()
67 test_nd = cvtest::randInt(rng)%3 == 0; in get_test_array_types_and_sizes()
101 int depth = cvtest::randInt(rng) % (CV_64F+1); in get_test_array_types_and_sizes()
102 int cn = cvtest::randInt(rng) % 4 + 1; in get_test_array_types_and_sizes()
107 if( depth < CV_32F || cvtest::randInt(rng)%8 == 0 ) in get_test_array_types_and_sizes()
109 power = (int)(cvtest::randInt(rng)%21 - 10); in get_test_array_types_and_sizes()
112 i = cvtest::randInt(rng)%17; in get_test_array_types_and_sizes()
123 test_nd = cvtest::randInt(rng)%3 == 0; in get_test_array_types_and_sizes()
139 double l, u = cvtest::randInt(ts->get_rng())%1000 + 1; in get_minmax_bounds()
[all …]
Dtest_rotatedrect.cpp79 if( cvtest::randInt(rng) % 2 == 0 ) d = -d; in prepare_test_case()
/external/apache-commons-math/src/main/java/org/apache/commons/math/random/
DAbstractRandomGenerator.java109 int randInt = nextInt(); in nextBytes() local
112 randInt = randInt >> 8; in nextBytes()
114 bytes[bytesOut++] = (byte) randInt; in nextBytes()
/external/opencv3/modules/imgproc/test/
Dtest_approxpoly.cpp130 int total = cvtest::randInt(rng) % 1000 + 1; in get_contour()
136 center.x = cvtest::randInt( rng ) % 1000; in get_contour()
137 center.y = cvtest::randInt( rng ) % 1000; in get_contour()
138 radius = cvtest::randInt( rng ) % 1000; in get_contour()
139 angle = cvtest::randInt( rng ) % 360; in get_contour()
145 int d_radius = cvtest::randInt( rng ) % 10 - 5; in get_contour()
Dtest_filter.cpp132 int depth = cvtest::randInt(rng) % CV_32F; in get_test_array_types_and_sizes()
133 int cn = cvtest::randInt(rng) % 3 + 1; in get_test_array_types_and_sizes()
140 aperture_size.width = cvtest::randInt(rng) % max_aperture_size + 1; in get_test_array_types_and_sizes()
141 aperture_size.height = cvtest::randInt(rng) % max_aperture_size + 1; in get_test_array_types_and_sizes()
142 anchor.x = cvtest::randInt(rng) % aperture_size.width; in get_test_array_types_and_sizes()
143 anchor.y = cvtest::randInt(rng) % aperture_size.height; in get_test_array_types_and_sizes()
148 inplace = cvtest::randInt(rng) % 2 != 0; in get_test_array_types_and_sizes()
198 int depth = cvtest::randInt(rng) % 4; in get_test_array_types_and_sizes()
203 shape = cvtest::randInt(rng) % 4; in get_test_array_types_and_sizes()
208 optype = cvtest::randInt(rng) % (optype_max - optype_min + 1) + optype_min; in get_test_array_types_and_sizes()
[all …]
Dtest_histograms.cpp144 cdims = cvtest::randInt(rng) % max_cdims + 1; in get_hist_params()
148 uniform = cvtest::randInt(rng) % 2; in get_hist_params()
149 hist_type = cvtest::randInt(rng) % 2 ? CV_HIST_SPARSE : CV_HIST_ARRAY; in get_hist_params()
153 dims[i] = cvtest::randInt(rng) % (max_dim_size + 2) + 2; in get_hist_params()
159 img_type = cvtest::randInt(rng) % 2 ? CV_32F : CV_8U; in get_hist_params()
174 range_delta = (cvtest::randInt(rng) % 2)*(high-low)*0.05; in get_hist_params()
263 nz_count = cvtest::randInt(rng) % MAX( totalSize/4, 100 ); in init_hist()
270 idx[j] = cvtest::randInt(rng) % dims[j]; in init_hist()
295 test_cpp = (cvtest::randInt(ts->get_rng()) % 2) != 0; in prepare_test_case()
377 iters = (cvtest::randInt(rng) % MAX(total_size/10,100)) + 1; in prepare_test_case()
[all …]
Dtest_floodfill.cpp100 depth = cvtest::randInt(rng) % 3; in get_test_array_types_and_sizes()
102 cn = cvtest::randInt(rng) & 1 ? 3 : 1; in get_test_array_types_and_sizes()
104 use_mask = (cvtest::randInt(rng) & 1) != 0; in get_test_array_types_and_sizes()
105 connectivity = (cvtest::randInt(rng) & 1) ? 4 : 8; in get_test_array_types_and_sizes()
106 mask_only = use_mask && (cvtest::randInt(rng) & 1) != 0; in get_test_array_types_and_sizes()
107 new_mask_val = cvtest::randInt(rng) & 255; in get_test_array_types_and_sizes()
108 range_type = cvtest::randInt(rng) % 3; in get_test_array_types_and_sizes()
123 seed_pt.x = cvtest::randInt(rng) % sizes[INPUT_OUTPUT][0].width; in get_test_array_types_and_sizes()
124 seed_pt.y = cvtest::randInt(rng) % sizes[INPUT_OUTPUT][0].height; in get_test_array_types_and_sizes()
143 test_cpp = (cvtest::randInt(rng) & 256) == 0; in get_test_array_types_and_sizes()
Dtest_contours.cpp167 int angle = cvtest::randInt(rng) % 180; in cvTsGenerateBlobImage()
168 int brightness = cvtest::randInt(rng) % in cvTsGenerateBlobImage()
170 center.x = cvtest::randInt(rng) % size.width; in cvTsGenerateBlobImage()
171 center.y = cvtest::randInt(rng) % size.height; in cvTsGenerateBlobImage()
173 axes.width = (cvtest::randInt(rng) % in cvTsGenerateBlobImage()
175 axes.height = (cvtest::randInt(rng) % in cvTsGenerateBlobImage()
223 approx_method = cvtest::randInt( rng ) % 4 + 1; in prepare_test_case()
224 retr_mode = cvtest::randInt( rng ) % 4; in prepare_test_case()
Dtest_imgwarp.cpp102 int depth = cvtest::randInt(rng) % 3; in get_test_array_types_and_sizes()
103 int cn = cvtest::randInt(rng) % 3 + 1; in get_test_array_types_and_sizes()
110 types[INPUT][1] = cvtest::randInt(rng) & 1 ? CV_32FC1 : CV_64FC1; in get_test_array_types_and_sizes()
112 interpolation = cvtest::randInt(rng) % max_interpolation; in get_test_array_types_and_sizes()
228 sz.width = (cvtest::randInt(rng) % sizes[INPUT][0].width) + 1; in get_test_array_types_and_sizes()
229 sz.height = (cvtest::randInt(rng) % sizes[INPUT][0].height) + 1; in get_test_array_types_and_sizes()
231 if( cvtest::randInt(rng) & 1 ) in get_test_array_types_and_sizes()
233 int xfactor = cvtest::randInt(rng) % 10 + 1; in get_test_array_types_and_sizes()
234 int yfactor = cvtest::randInt(rng) % 10 + 1; in get_test_array_types_and_sizes()
236 if( cvtest::randInt(rng) & 1 ) in get_test_array_types_and_sizes()
[all …]
Dtest_thresh.cpp78 int depth = cvtest::randInt(rng) % 3, cn = cvtest::randInt(rng) % 4 + 1; in get_test_array_types_and_sizes()
83 thresh_type = cvtest::randInt(rng) % 5; in get_test_array_types_and_sizes()
89 if( cvtest::randInt(rng)%4 == 0 ) in get_test_array_types_and_sizes()
98 if( cvtest::randInt(rng)%4 == 0 ) in get_test_array_types_and_sizes()
Dtest_templmatch.cpp108 int depth = cvtest::randInt(rng) % 2, cn = cvtest::randInt(rng) & 1 ? 3 : 1; in get_test_array_types_and_sizes()
115 sizes[INPUT][1].width = cvtest::randInt(rng)%MIN(sizes[INPUT][1].width,max_template_size) + 1; in get_test_array_types_and_sizes()
116 sizes[INPUT][1].height = cvtest::randInt(rng)%MIN(sizes[INPUT][1].height,max_template_size) + 1; in get_test_array_types_and_sizes()
121 method = cvtest::randInt(rng)%6; in get_test_array_types_and_sizes()
122 test_cpp = (cvtest::randInt(rng) & 256) == 0; in get_test_array_types_and_sizes()
Dtest_distancetransform.cpp90 if( cvtest::randInt(rng) & 1 ) in get_test_array_types_and_sizes()
99 dist_type = cvtest::randInt(rng) % 3; in get_test_array_types_and_sizes()
136 int i = cvtest::randInt(rng) % mat.rows; in prepare_test_case()
137 int j = cvtest::randInt(rng) % mat.cols; in prepare_test_case()
Dtest_moments.cpp113 int cn = (cvtest::randInt(rng) % 4) + 1; in get_test_array_types_and_sizes()
114 int depth = cvtest::randInt(rng) % 4; in get_test_array_types_and_sizes()
117 is_binary = cvtest::randInt(rng) % 2 != 0; in get_test_array_types_and_sizes()
119 try_umat = cvtest::randInt(rng) % 5 != 0; in get_test_array_types_and_sizes()
121 try_umat = cvtest::randInt(rng) % 2 != 0; in get_test_array_types_and_sizes()
144 coi = cvtest::randInt(rng) % cn; in get_test_array_types_and_sizes()
Dtest_canny.cpp91 aperture_size = cvtest::randInt(rng) % 2 ? 5 : 3; in get_test_array_types_and_sizes()
97 if( cvtest::randInt(rng) % 2 ) in get_test_array_types_and_sizes()
100 use_true_gradient = cvtest::randInt(rng) % 2 != 0; in get_test_array_types_and_sizes()
101 test_cpp = (cvtest::randInt(rng) & 256) == 0; in get_test_array_types_and_sizes()
Dtest_convhull.cpp346 use_storage = cvtest::randInt(rng) % 2; in prepare_test_case()
347 point_type = CV_MAKETYPE(cvtest::randInt(rng) % in prepare_test_case()
352 storage = cvCreateMemStorage( (cvtest::randInt(rng)%10 + 1)*1024 ); in prepare_test_case()
360 if( cvtest::randInt(rng) % 2 ) in prepare_test_case()
382 test_cpp = (cvtest::randInt(rng) & 16) == 0; in prepare_test_case()
473 orientation = cvtest::randInt(rng) % 2 ? CV_CLOCKWISE : CV_COUNTER_CLOCKWISE; in prepare_test_case()
474 return_points = cvtest::randInt(rng) % 2; in prepare_test_case()
476 use_storage_for_hull = (cvtest::randInt(rng) % 2) && !test_cpp; in prepare_test_case()
480 storage = cvCreateMemStorage( (cvtest::randInt(rng)%10 + 1)*1024 ); in prepare_test_case()
489 if( cvtest::randInt(rng) % 2 ) in prepare_test_case()
[all …]
/external/opencv3/modules/ts/src/
Dts_arrtest.cpp159 unsigned t = randInt(rng); in prepare_test_case()
169 whole_size.width += randInt(rng) % 10; in prepare_test_case()
170 whole_size.height += randInt(rng) % 10; in prepare_test_case()
182 roi.x = randInt(rng) % (whole_size.width - size.width); in prepare_test_case()
185 roi.y = randInt(rng) % (whole_size.height - size.height); in prepare_test_case()
/external/opencv3/modules/video/test/
Dtest_accum.cpp75 int depth = cvtest::randInt(rng) % 3, cn = cvtest::randInt(rng) & 1 ? 3 : 1; in get_test_array_types_and_sizes()
76 int accdepth = std::max((int)(cvtest::randInt(rng) % 2 + 1), depth); in get_test_array_types_and_sizes()
/external/opencv3/modules/flann/test/
Dtest_lshtable_badarg.cpp82 caller.key_size += cvtest::randInt(rng) % 100; in run()

12