/third_party/boost/libs/graph/test/ |
D | degree_centrality.cpp | 52 CentralityMap cm(cents, g); in test_undirected() local 53 all_degree_centralities(g, cm); in test_undirected() 55 BOOST_ASSERT(cm[v[0]] == 3); in test_undirected() 56 BOOST_ASSERT(cm[v[1]] == 2); in test_undirected() 57 BOOST_ASSERT(cm[v[2]] == 2); in test_undirected() 58 BOOST_ASSERT(cm[v[3]] == 1); in test_undirected() 59 BOOST_ASSERT(cm[v[4]] == 2); in test_undirected() 76 CentralityMap cm(cents, g); in test_influence() local 77 all_influence_values(g, cm); in test_influence() 79 BOOST_ASSERT(cm[v[0]] == 1); in test_influence() [all …]
|
D | mean_geodesic.cpp | 69 CentralityMap cm(centralities, g); in test_undirected() local 75 double geo1 = all_mean_geodesics(g, dm, cm); in test_undirected() 76 double geo2 = small_world_distance(g, cm); in test_undirected() 78 BOOST_ASSERT(cm[v[0]] == double(5) / 4); in test_undirected() 79 BOOST_ASSERT(cm[v[1]] == double(7) / 4); in test_undirected() 80 BOOST_ASSERT(cm[v[2]] == double(7) / 4); in test_undirected() 81 BOOST_ASSERT(cm[v[3]] == double(9) / 4); in test_undirected() 82 BOOST_ASSERT(cm[v[4]] == double(6) / 4); in test_undirected() 109 CentralityMap cm(centralities, g); in test_directed() local 115 double geo1 = all_mean_geodesics(g, dm, cm); in test_directed() [all …]
|
D | closeness_centrality.cpp | 68 CentralityMap cm(centralities, g); in test_undirected() local 74 all_closeness_centralities(g, dm, cm); in test_undirected() 76 BOOST_ASSERT(cm[v[0]] == double(1) / 5); in test_undirected() 77 BOOST_ASSERT(cm[v[1]] == double(1) / 7); in test_undirected() 78 BOOST_ASSERT(cm[v[2]] == double(1) / 7); in test_undirected() 79 BOOST_ASSERT(cm[v[3]] == double(1) / 9); in test_undirected() 80 BOOST_ASSERT(cm[v[4]] == double(1) / 6); in test_undirected() 105 CentralityMap cm(centralities, g); in test_directed() local 111 all_closeness_centralities(g, dm, cm); in test_directed() 113 BOOST_ASSERT(cm[v[0]] == double(0)); in test_directed() [all …]
|
D | clustering_coefficient.cpp | 56 ClusteringMap cm(cc, g); in test_undirected() local 77 all_clustering_coefficients(g, cm); in test_undirected() 81 BOOST_ASSERT(cm[v[1]] == 1); in test_undirected() 82 BOOST_ASSERT(cm[v[2]] == 1); in test_undirected() 83 BOOST_ASSERT(cm[v[3]] == 0); in test_undirected() 84 BOOST_ASSERT(cm[v[4]] == 0); in test_undirected() 90 double coef = mean_clustering_coefficient(g, cm); in test_undirected()
|
/third_party/boost/libs/math/test/float128/ |
D | test_std_lib.cpp | 155 std::complex<boost::floatmax_t> cm(2.5, 3.5); in BOOST_AUTO_TEST_CASE() local 157 BOOST_CHECK_EQUAL(real(cm), BOOST_FLOATMAX_C(2.5)); in BOOST_AUTO_TEST_CASE() 158 BOOST_CHECK_EQUAL(imag(cm), BOOST_FLOATMAX_C(3.5)); in BOOST_AUTO_TEST_CASE() 159 BOOST_CHECK_CLOSE_FRACTION(abs(cm), std::sqrt(real(cm) * real(cm) + imag(cm) * imag(cm)), tol); in BOOST_AUTO_TEST_CASE() 160 BOOST_CHECK_CLOSE_FRACTION(arg(cm), std::atan2(imag(cm), real(cm)), tol); in BOOST_AUTO_TEST_CASE() 161 BOOST_CHECK_EQUAL(norm(cm), norm(cd)); in BOOST_AUTO_TEST_CASE() 162 BOOST_CHECK_EQUAL(conj(cm), std::complex<boost::floatmax_t>(2.5, -3.5)); in BOOST_AUTO_TEST_CASE() 163 BOOST_CHECK_EQUAL(proj(cm), cm); in BOOST_AUTO_TEST_CASE() 193 BOOST_CHECK_CLOSE_FRACTION(real(cm), real(std::polar(abs(cm), arg(cm))), tol); in BOOST_AUTO_TEST_CASE() 194 BOOST_CHECK_CLOSE_FRACTION(imag(cm), imag(std::polar(abs(cm), arg(cm))), tol); in BOOST_AUTO_TEST_CASE() [all …]
|
/third_party/pulseaudio/src/pulsecore/ |
D | mime-type.c | 29 bool pa_sample_spec_is_mime(const pa_sample_spec *ss, const pa_channel_map *cm) { in pa_sample_spec_is_mime() argument 31 pa_assert(pa_channel_map_compatible(cm, ss)); in pa_sample_spec_is_mime() 52 if ((cm->channels == 1 && cm->map[0] != PA_CHANNEL_POSITION_MONO) || in pa_sample_spec_is_mime() 53 …(cm->channels == 2 && (cm->map[0] != PA_CHANNEL_POSITION_LEFT || cm->map[1] != PA_CHANNEL_POSITION… in pa_sample_spec_is_mime() 66 if (cm->map[0] != PA_CHANNEL_POSITION_MONO) in pa_sample_spec_is_mime() 76 void pa_sample_spec_mimefy(pa_sample_spec *ss, pa_channel_map *cm) { in pa_sample_spec_mimefy() argument 78 pa_assert(pa_channel_map_compatible(cm, ss)); in pa_sample_spec_mimefy() 139 pa_channel_map_init_auto(cm, ss->channels, PA_CHANNEL_MAP_DEFAULT); in pa_sample_spec_mimefy() 141 pa_assert(pa_sample_spec_is_mime(ss, cm)); in pa_sample_spec_mimefy() 144 char *pa_sample_spec_to_mime_type(const pa_sample_spec *ss, const pa_channel_map *cm) { in pa_sample_spec_to_mime_type() argument [all …]
|
D | sndfile-util.c | 151 int pa_sndfile_read_channel_map(SNDFILE *sf, pa_channel_map *cm) { in pa_sndfile_read_channel_map() argument 184 pa_assert(cm); in pa_sndfile_read_channel_map() 198 cm->channels = (uint8_t) sfi.channels; in pa_sndfile_read_channel_map() 199 for (c = 0; c < cm->channels; c++) { in pa_sndfile_read_channel_map() 206 cm->map[c] = table[channels[c]]; in pa_sndfile_read_channel_map() 211 if (!pa_channel_map_valid(cm)) in pa_sndfile_read_channel_map() 217 int pa_sndfile_write_channel_map(SNDFILE *sf, pa_channel_map *cm) { in pa_sndfile_write_channel_map() argument 285 pa_assert(cm); in pa_sndfile_write_channel_map() 288 if (cm->channels == 1 && cm->map[0] == PA_CHANNEL_POSITION_MONO) in pa_sndfile_write_channel_map() 291 if (cm->channels == 2 && in pa_sndfile_write_channel_map() [all …]
|
/third_party/python/Lib/test/ |
D | test_flufl.py | 12 with self.assertRaises(SyntaxError) as cm: 15 self.assertRegex(str(cm.exception), 17 self.assertIn('2 != 3', cm.exception.text) 18 self.assertEqual(cm.exception.filename, '<FLUFL test>') 20 self.assertTrue(cm.exception.lineno, 2) 23 self.assertEqual(cm.exception.offset, 3) 28 with self.assertRaises(SyntaxError) as cm: 30 self.assertRegex(str(cm.exception), "invalid syntax") 31 self.assertIn('2 <> 3', cm.exception.text) 32 self.assertEqual(cm.exception.filename, '<FLUFL test>') [all …]
|
D | test_future.py | 42 with self.assertRaises(SyntaxError) as cm: 44 self.check_syntax_error(cm.exception, "badsyntax_future3", 3) 47 with self.assertRaises(SyntaxError) as cm: 49 self.check_syntax_error(cm.exception, "badsyntax_future4", 3) 52 with self.assertRaises(SyntaxError) as cm: 54 self.check_syntax_error(cm.exception, "badsyntax_future5", 4) 57 with self.assertRaises(SyntaxError) as cm: 59 self.check_syntax_error(cm.exception, "badsyntax_future6", 3) 62 with self.assertRaises(SyntaxError) as cm: 64 self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53) [all …]
|
D | _test_atexit.py | 18 with support.catch_unraisable_exception() as cm: 22 self.assertEqual(cm.unraisable.object, func) 23 self.assertEqual(cm.unraisable.exc_type, exc_type) 24 self.assertEqual(type(cm.unraisable.exc_value), exc_type) 126 with support.catch_unraisable_exception() as cm: 128 self.assertEqual(cm.unraisable.object, func) 129 self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError) 130 self.assertEqual(type(cm.unraisable.exc_value), ZeroDivisionError)
|
/third_party/boost/tools/quickbook/test/ |
D | image-1_6.quickbook | 8 [$test.gif [width 10cm] [height 10cm]] 12 [$test.gif [alt Foo] [width 10cm] [height 10cm]] 13 [$test.gif [alt Foo\[\]] [width 10cm] [height 10cm]] 20 [$test.gif [width 10cm] [height 10cm] [width 20cm]] 23 [$boost:boost.png [width 10cm] [height 10cm] [width 20cm]]
|
D | image-1_5.quickbook | 8 [$test.gif [width 10cm] [height 10cm]] 12 [$test.gif [alt Foo] [width 10cm] [height 10cm]] 19 [$test.gif [width 10cm] [height 10cm] [width 20cm]]
|
/third_party/curl/docs/examples/ |
D | 10-at-a-time.c | 96 static void add_transfer(CURLM *cm, int i) in add_transfer() argument 102 curl_multi_add_handle(cm, eh); in add_transfer() 107 CURLM *cm; in main() local 114 cm = curl_multi_init(); in main() 117 curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX_PARALLEL); in main() 120 add_transfer(cm, transfers); in main() 123 curl_multi_perform(cm, &still_alive); in main() 125 while((msg = curl_multi_info_read(cm, &msgs_left))) { in main() 132 curl_multi_remove_handle(cm, e); in main() 139 add_transfer(cm, transfers++); in main() [all …]
|
/third_party/pulseaudio/src/tests/ |
D | channelmap-test.c | 14 char cm[PA_CHANNEL_MAP_SNPRINT_MAX]; in START_TEST() local 19 fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); in START_TEST() 23 fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); in START_TEST() 27 fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); in START_TEST() 31 fprintf(stderr, "map: <%s>\n", pa_channel_map_snprint(cm, sizeof(cm), &map)); in START_TEST() 33 pa_channel_map_parse(&map2, cm); in START_TEST()
|
D | volume-ui.py | 133 def get_balance(this, cm): argument 134 return this._get_balance(byref(this), byref(cm)) 136 def get_fade(this, cm): argument 137 return this._get_fade(byref(this), byref(cm)) 139 def set_balance(this, cm, f): argument 140 return this._set_balance(byref(this), byref(cm), f) 142 def set_fade(this, cm, f): argument 143 return this._set_fade(byref(this), byref(cm), f) 151 cm = ChannelMap() variable 154 cm.parse(sys.argv[1]) [all …]
|
/third_party/curl/tests/libtest/ |
D | lib540.c | 49 static int init(int num, CURLM *cm, const char *url, const char *userpwd, in init() argument 86 res_multi_add_handle(cm, eh[num]); in init() 100 static int loop(int num, CURLM *cm, const char *url, const char *userpwd, in loop() argument 110 res = init(num, cm, url, userpwd, headers); in loop() 118 res_multi_perform(cm, &U); in loop() 131 res_multi_fdset(cm, &R, &W, &E, &M); in loop() 137 res_multi_timeout(cm, &L); in loop() 158 while((msg = curl_multi_info_read(cm, &Q)) != NULL) { in loop() 164 curl_multi_remove_handle(cm, e); in loop() 187 CURLM *cm = NULL; in test() local [all …]
|
D | lib1905.c | 33 CURLM *cm; in test() local 37 cm = curl_multi_init(); in test() 38 if(!cm) { in test() 58 curl_multi_add_handle(cm, ch); in test() 70 curl_multi_perform(cm, &unfinished); in test() 72 curl_multi_fdset(cm, &R, &W, &E, &MAX); in test() 73 curl_multi_timeout(cm, &max_tout); in test() 90 curl_multi_remove_handle(cm, ch); in test() 94 curl_multi_cleanup(cm); in test()
|
/third_party/curl/lib/ |
D | version_win32.c | 154 ULONGLONG cm = 0; in curlx_verify_windows_version() local 210 cm = VerSetConditionMask(cm, VER_MAJORVERSION, majorCondition); in curlx_verify_windows_version() 211 cm = VerSetConditionMask(cm, VER_MINORVERSION, minorCondition); in curlx_verify_windows_version() 212 cm = VerSetConditionMask(cm, VER_SERVICEPACKMAJOR, spMajorCondition); in curlx_verify_windows_version() 213 cm = VerSetConditionMask(cm, VER_SERVICEPACKMINOR, spMinorCondition); in curlx_verify_windows_version() 215 cm = VerSetConditionMask(cm, VER_PLATFORMID, VER_EQUAL); in curlx_verify_windows_version() 219 cm)) in curlx_verify_windows_version()
|
/third_party/python/Lib/test/test_email/ |
D | test_message.py | 509 cm = self._TestContentManager() 510 self.assertEqual(m.get_content(content_manager=cm), (m, (), {})) 511 msg, args, kw = m.get_content('foo', content_manager=cm, bar=1, k=2) 527 cm = self._TestContentManager() 528 m.set_content(content_manager=cm) 529 self.assertEqual(cm.msg, m) 530 self.assertEqual(cm.args, ()) 531 self.assertEqual(cm.kw, {}) 532 m.set_content('foo', content_manager=cm, bar=1, k=2) 533 self.assertEqual(cm.msg, m) [all …]
|
/third_party/ffmpeg/libavcodec/ |
D | wmv2dsp.c | 145 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; in wmv2_mspel8_h_lowpass() local 149 dst[0] = cm[(9 * (src[0] + src[1]) - (src[-1] + src[2]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 150 dst[1] = cm[(9 * (src[1] + src[2]) - (src[0] + src[3]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 151 dst[2] = cm[(9 * (src[2] + src[3]) - (src[1] + src[4]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 152 dst[3] = cm[(9 * (src[3] + src[4]) - (src[2] + src[5]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 153 dst[4] = cm[(9 * (src[4] + src[5]) - (src[3] + src[6]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 154 dst[5] = cm[(9 * (src[5] + src[6]) - (src[4] + src[7]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 155 dst[6] = cm[(9 * (src[6] + src[7]) - (src[5] + src[8]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 156 dst[7] = cm[(9 * (src[7] + src[8]) - (src[6] + src[9]) + 8) >> 4]; in wmv2_mspel8_h_lowpass() 165 const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; in wmv2_mspel8_v_lowpass() local [all …]
|
/third_party/skia/gm/ |
D | color4f.cpp | 35 SkColorMatrix cm; in make_cf0() local 36 cm.setSaturation(0.75f); in make_cf0() 37 return SkColorFilters::Matrix(cm); in make_cf0() 41 SkColorMatrix cm; in make_cf1() local 42 cm.setSaturation(0.75f); in make_cf1() 43 auto a = SkColorFilters::Matrix(cm); in make_cf1() 48 cm.setScale(1.1f, 0.9f, 1); in make_cf1() 49 return a->makeComposed(SkColorFilters::Matrix(cm)); in make_cf1()
|
/third_party/flutter/skia/gm/ |
D | color4f.cpp | 35 SkColorMatrix cm; in make_cf0() local 36 cm.setSaturation(0.75f); in make_cf0() 37 return SkColorFilters::Matrix(cm); in make_cf0() 41 SkColorMatrix cm; in make_cf1() local 42 cm.setSaturation(0.75f); in make_cf1() 43 auto a = SkColorFilters::Matrix(cm); in make_cf1() 48 cm.setScale(1.1f, 0.9f, 1); in make_cf1() 49 return a->makeComposed(SkColorFilters::Matrix(cm)); in make_cf1()
|
/third_party/pulseaudio/src/pulsecore/filter/ |
D | lfe-filter.c | 52 pa_channel_map cm; member 65 pa_lfe_filter_t * pa_lfe_filter_new(const pa_sample_spec* ss, const pa_channel_map* cm, float cross… in pa_lfe_filter_new() argument 69 f->cm = *cm; in pa_lfe_filter_new() 95 for (i = 0; i < f->cm.channels; i++) in process_block() 96 … lr4_process_float32(&f->lr4[i], samples, f->cm.channels, &data[i], garbage ? garbage : &data[i]); in process_block() 102 for (i = 0; i < f->cm.channels; i++) in process_block() 103 … lr4_process_s16(&f->lr4[i], samples, f->cm.channels, &data[i], garbage ? garbage : &data[i]); in process_block() 141 memcpy(s->lr4, f->lr4, sizeof(struct lr4) * f->cm.channels); in pa_lfe_filter_process() 163 for (i = 0; i < f->cm.channels; i++) in pa_lfe_filter_update_rate() 164 …lr4_set(&f->lr4[i], f->cm.map[i] == PA_CHANNEL_POSITION_LFE ? BQ_LOWPASS : BQ_HIGHPASS, biquad_fre… in pa_lfe_filter_update_rate() [all …]
|
/third_party/python/Objects/ |
D | funcobject.c | 800 cm_dealloc(classmethod *cm) in cm_dealloc() argument 802 _PyObject_GC_UNTRACK((PyObject *)cm); in cm_dealloc() 803 Py_XDECREF(cm->cm_callable); in cm_dealloc() 804 Py_XDECREF(cm->cm_dict); in cm_dealloc() 805 Py_TYPE(cm)->tp_free((PyObject *)cm); in cm_dealloc() 809 cm_traverse(classmethod *cm, visitproc visit, void *arg) in cm_traverse() argument 811 Py_VISIT(cm->cm_callable); in cm_traverse() 812 Py_VISIT(cm->cm_dict); in cm_traverse() 817 cm_clear(classmethod *cm) in cm_clear() argument 819 Py_CLEAR(cm->cm_callable); in cm_clear() [all …]
|
/third_party/python/Lib/test/test_json/ |
D | test_fail.py | 129 with self.assertRaises(self.JSONDecodeError) as cm: 131 err = cm.exception 165 with self.assertRaises(self.JSONDecodeError) as cm: 167 err = cm.exception 188 with self.assertRaises(self.JSONDecodeError) as cm: 190 err = cm.exception 207 with self.assertRaises(self.JSONDecodeError) as cm: 209 err = cm.exception
|