您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ Data_copy函数代码示例

51自学网 2021-06-01 20:25:13
  C++
这篇教程C++ Data_copy函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中Data_copy函数的典型用法代码示例。如果您正苦于以下问题:C++ Data_copy函数的具体用法?C++ Data_copy怎么用?C++ Data_copy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了Data_copy函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Permutation_checkInvariant

void Permutation_checkInvariant (Permutation me) {	autoPermutation thee = Data_copy (me);	NUMsort_l (thy numberOfElements, thy p);	for (long i = 1; i <= my numberOfElements; i++) {		if (thy p[i] != i) {			Melder_throw (me, ":not a valid permutation.");		}	}}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:9,


示例2: Sound_FormantTier_filter_noscale

Sound Sound_FormantTier_filter_noscale (Sound me, FormantTier formantTier) {	try {		autoSound thee = Data_copy (me);		Sound_FormantTier_filter_inline (thee.peek(), formantTier);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": not filtered with ", formantTier, ".");	}}
开发者ID:tommyharris,项目名称:praat-tau,代码行数:9,


示例3: SpellingChecker_extractUserDictionary

autoSortedSetOfString SpellingChecker_extractUserDictionary (SpellingChecker me) {	try {		if (! my userDictionary)			Melder_throw (U"This spelling checker does not contain a user dictionary.");		return Data_copy (my userDictionary.get());	} catch (MelderError) {		Melder_throw (me, U": user dictionary not extracted.");	}}
开发者ID:guilhermegarcia,项目名称:praat-1,代码行数:9,


示例4: Sound_filter_oneFormant

Sound Sound_filter_oneFormant (Sound me, double frequency, double bandwidth) {	try {		autoSound thee = Data_copy (me);		Sound_filterWithOneFormantInline (thee.peek(), frequency, bandwidth);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, U": not filtered (one formant).");	}}
开发者ID:psibre,项目名称:praat,代码行数:9,


示例5: PowerCepstrum_subtractTilt

autoPowerCepstrum PowerCepstrum_subtractTilt (PowerCepstrum me, double qstartFit, double qendFit, int lineType, int fitMethod) {	try {		autoPowerCepstrum thee = Data_copy (me);		PowerCepstrum_subtractTilt_inline (thee.get(), qstartFit,  qendFit, lineType, fitMethod);		return thee;	} catch (MelderError) {		Melder_throw (me, U": couldn't subtract tilt line.");	}}
开发者ID:PaulBoersma,项目名称:praat,代码行数:9,


示例6: LPC_and_Sound_filterInverseWithFilterAtTime

Sound LPC_and_Sound_filterInverseWithFilterAtTime (LPC me, Sound thee, int channel, double time) {	try {		autoSound him = Data_copy (thee);		LPC_and_Sound_filterInverseWithFilterAtTime_inline (me, him.peek(), channel, time);		return him.transfer();	} catch (MelderError) {		Melder_throw (thee, ": not inverse filtered.");	}}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:9,


示例7: Permutation_permuteRandomly

Permutation Permutation_permuteRandomly (Permutation me, long from, long to) {	try {		autoPermutation thee = Data_copy (me);		Permutation_permuteRandomly_inline (thee.peek(), from, to);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": not permuted.");	}}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:9,


示例8: _Sound_to_LPC

static LPC _Sound_to_LPC (Sound me, int predictionOrder, double analysisWidth, double dt,                          double preEmphasisFrequency, int method, double tol1, double tol2) {	double t1, samplingFrequency = 1.0 / my dx;	double windowDuration = 2 * analysisWidth; /* gaussian window */	long nFrames, frameErrorCount = 0;	if (floor (windowDuration / my dx) < predictionOrder + 1) Melder_throw ("Analysis window duration too short./n"		        "For a prediction order of ", predictionOrder, " the analysis window duration has to be greater than ", my dx * (predictionOrder + 1),		        "Please increase the analysis window duration or lower the prediction order.");	// Convenience: analyse the whole sound into one LPC_frame	if (windowDuration > my dx * my nx) {		windowDuration = my dx * my nx;	}	Sampled_shortTermAnalysis (me, windowDuration, dt, & nFrames, & t1);	autoSound sound = Data_copy (me);	autoSound sframe = Sound_createSimple (1, windowDuration, samplingFrequency);	autoSound window = Sound_createGaussian (windowDuration, samplingFrequency);	autoLPC thee = LPC_create (my xmin, my xmax, nFrames, dt, t1, predictionOrder, my dx);	autoMelderProgress progress (L"LPC analysis");	if (preEmphasisFrequency < samplingFrequency / 2) {		Sound_preEmphasis (sound.peek(), preEmphasisFrequency);	}	for (long i = 1; i <= nFrames; i++) {		LPC_Frame lpcframe = (LPC_Frame) & thy d_frames[i];		double t = Sampled_indexToX (thee.peek(), i);		LPC_Frame_init (lpcframe, predictionOrder);		Sound_into_Sound (sound.peek(), sframe.peek(), t - windowDuration / 2);		Vector_subtractMean (sframe.peek());		Sounds_multiply (sframe.peek(), window.peek());		if (method == LPC_METHOD_AUTO) {			if (! Sound_into_LPC_Frame_auto (sframe.peek(), lpcframe)) {				frameErrorCount++;			}		} else if (method == LPC_METHOD_COVAR) {			if (! Sound_into_LPC_Frame_covar (sframe.peek(), lpcframe)) {				frameErrorCount++;			}		} else if (method == LPC_METHOD_BURG) {			if (! Sound_into_LPC_Frame_burg (sframe.peek(), lpcframe)) {				frameErrorCount++;			}		} else if (method == LPC_METHOD_MARPLE) {			if (! Sound_into_LPC_Frame_marple (sframe.peek(), lpcframe, tol1, tol2)) {				frameErrorCount++;			}		}		if ( (i % 10) == 1) {			Melder_progress ( (double) i / nFrames, L"LPC analysis of frame ",			                   Melder_integer (i), L" out of ", Melder_integer (nFrames), L".");		}	}	return thee.transfer();}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:56,


示例9: PowerCepstrogram_paint

void PowerCepstrogram_paint (PowerCepstrogram me, Graphics g, double tmin, double tmax, double qmin, double qmax, double dBmaximum, int autoscaling, double dynamicRangedB, double dynamicCompression, int garnish) {	if (tmax <= tmin) { tmin = my xmin; tmax = my xmax; }	if (qmax <= qmin) { qmin = my ymin; qmax = my ymax; }	long itmin, itmax, ifmin, ifmax;	if (! Matrix_getWindowSamplesX (me, tmin - 0.49999 * my dx, tmax + 0.49999 * my dx, & itmin, & itmax) ||		 ! Matrix_getWindowSamplesY (me, qmin - 0.49999 * my dy, qmax + 0.49999 * my dy, & ifmin, & ifmax)) {		return;	}	autoMatrix thee = Data_copy (me);	double min = 1e308, max = -min;	for (long i = 1; i <= my ny; i++) {		for (long j = 1; j <= my nx; j++) {			double val = TO10LOG (my z[i][j]);			min = val < min ? val : min;			max = val > max ? val : max;			thy z[i][j] = val;		}	}	double dBminimum = dBmaximum - dynamicRangedB;	if (autoscaling) {		dBminimum = min; dBmaximum = max;	}	for (long j = 1; j <= my nx; j++) {		double lmax = thy z[1][j];		for (long i = 2; i <= my ny; i++) {			if (thy z[i][j] > lmax) {				lmax = thy z[i][j];			}		}		double factor = dynamicCompression * (max - lmax);		for (long i = 1; i <= my ny; i++) {			thy z[i][j] += factor;		}	}		Graphics_setInner (g);	Graphics_setWindow (g, tmin, tmax, qmin, qmax);	Graphics_image (g, thy z,		itmin, itmax,		Matrix_columnToX (thee.get(), itmin - 0.5),		Matrix_columnToX (thee.get(), itmax + 0.5),		ifmin, ifmax,		Matrix_rowToY (thee.get(), ifmin - 0.5),		Matrix_rowToY (thee.get(), ifmax + 0.5),		dBminimum, dBmaximum);	Graphics_unsetInner (g);	if (garnish) {		Graphics_drawInnerBox (g);		Graphics_textBottom (g, true, U"Time (s)");		Graphics_marksBottom (g, 2, true, true, false);		Graphics_marksLeft (g, 2, true, true, false);		Graphics_textLeft (g, true, U"Quefrency (s)");	}}
开发者ID:nullpunktTUD,项目名称:praat,代码行数:56,


示例10: OrderedOfString_selectUniqueItems

autoOrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me) {	try {		autoStringSet thee = StringSet_create ();		for (long i = 1; i <= my size; i ++) {			if (! thy hasItem (my at [i])) {   // FIXME: first sort, then unicize				autoSimpleString item = Data_copy (my at [i]);				thy addItem_move (item.move());			}		}		autoOrderedOfString him = OrderedOfString_create ();		for (long i = 1; i <= thy size; i ++) {			autoSimpleString item = Data_copy (thy at [i]);			his addItem_move (item.move());		}		return him;	} catch (MelderError) {		Melder_throw (me, U": unique items not selected.");	}}
开发者ID:READSEARCH,项目名称:praat,代码行数:19,


示例11: Sound_AmplitudeTier_multiply

autoSound Sound_AmplitudeTier_multiply (Sound me, AmplitudeTier amplitude) {	try {		autoSound thee = Data_copy (me);		Sound_AmplitudeTier_multiply_inline (thee.peek(), amplitude);		Vector_scale (thee.peek(), 0.9);		return thee;	} catch (MelderError) {		Melder_throw (me, U": not multiplied by ", amplitude, U".");	}}
开发者ID:guilhermegarcia,项目名称:praat-1,代码行数:10,


示例12: Configuration_varimax

autoConfiguration Configuration_varimax (Configuration me, int normalizeRows,                                     int quartimax, long maximumNumberOfIterations, double tolerance) {	try {		autoConfiguration thee = Data_copy (me);		NUMvarimax (my data, thy data, my numberOfRows, my numberOfColumns, normalizeRows, quartimax, maximumNumberOfIterations, tolerance);		return thee;	} catch (MelderError) {		Melder_throw (me, U": varimax rotation not performed.");	}}
开发者ID:motiz88,项目名称:praat,代码行数:10,


示例13: VocalTract_to_VocalTractPoint

autoVocalTractPoint VocalTract_to_VocalTractPoint (VocalTract me, double time) {	try {		autoVocalTractPoint thee = Thing_new (VocalTractPoint);		thy number = time;		thy d_vocalTract = Data_copy (me).transfer();		return thee;	} catch (MelderError) {		Melder_throw (me, U": not converted to VocalTractPoint.");	}}
开发者ID:guilhermegarcia,项目名称:praat-1,代码行数:10,


示例14: Sound_FormantGrid_filter

Sound Sound_FormantGrid_filter (Sound me, FormantGrid formantGrid) {	try {		autoSound thee = Data_copy (me);		Sound_FormantGrid_filter_inline (thee.peek(), formantGrid);		Vector_scale (thee.peek(), 0.99);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": not filtered with ", formantGrid, ".");	}}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:10,


示例15: WordList_upto_SpellingChecker

SpellingChecker WordList_upto_SpellingChecker (WordList me) {	try {		autoSpellingChecker thee = Thing_new (SpellingChecker);		thy wordList = Data_copy (me);		thy separatingCharacters = Melder_dup (U".,;:()/"");		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, U": not converted to SpellingChecker.");	}}
开发者ID:eginhard,项目名称:praat,代码行数:10,


示例16: Discriminant_extractWithinGroupSSCP

autoSSCP Discriminant_extractWithinGroupSSCP (Discriminant me, long index) {    try {        if (index < 1 || index > my numberOfGroups) Melder_throw            (U"Index must be in interval [1,", my numberOfGroups, U"].");        autoSSCP thee = Data_copy (my groups->at [index]);        return thee;    } catch (MelderError) {        Melder_throw (me, U": within group SSCP not created.");    }}
开发者ID:rlaboiss,项目名称:praat,代码行数:10,


示例17: Sound_filter_deemphasis

Sound Sound_filter_deemphasis (Sound me, double frequency) {	try {		autoSound thee = Data_copy (me);		Sound_deEmphasis (thee.peek(), frequency);		Matrix_scaleAbsoluteExtremum (thee.peek(), 0.99);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, U": not filtered (de-emphasis).");	}}
开发者ID:psibre,项目名称:praat,代码行数:10,


示例18: Sound_IntensityTier_multiply

autoSound Sound_IntensityTier_multiply (Sound me, IntensityTier intensity, int scale) {	try {		autoSound thee = Data_copy (me);		Sound_IntensityTier_multiply_inline (thee.peek(), intensity);		if (scale) Vector_scale (thee.peek(), 0.9);		return thee;	} catch (MelderError) {		Melder_throw (me, U": not multiplied with ", intensity, U".");	}}
开发者ID:guilhermegarcia,项目名称:praat-1,代码行数:10,


示例19: Sound_FormantTier_filter

autoSound Sound_FormantTier_filter (Sound me, FormantTier formantTier) {	try {		autoSound thee = Data_copy (me);		Sound_FormantTier_filter_inline (thee.peek(), formantTier);		Vector_scale (thee.peek(), 0.99);		return thee;	} catch (MelderError) {		Melder_throw (me, U": not filtered with ", formantTier, U".");	}}
开发者ID:ffostertw,项目名称:praat,代码行数:10,


示例20: Manipulation_AnyTier_to_Manipulation

autoManipulation Manipulation_AnyTier_to_Manipulation (Manipulation me, AnyTier tier) {	try {		if (! my pitch) Melder_throw (U"Missing pitch manipulation.");		autoManipulation result = Data_copy (me);		result -> pitch = PitchTier_AnyTier_to_PitchTier (my pitch.get(), tier);		return result;	} catch (MelderError) {		Melder_throw (me, U": not converted.");	}}
开发者ID:nullpunktTUD,项目名称:praat,代码行数:10,


示例21: PowerCepstrogram_subtractTilt

PowerCepstrogram PowerCepstrogram_subtractTilt (PowerCepstrogram me, double qstartFit, double qendFit, int lineType, int fitMethod) {	try {		autoPowerCepstrogram thee = Data_copy (me);		PowerCepstrogram_subtractTilt_inline (thee.peek(), qstartFit, qendFit, lineType, fitMethod);		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": no tilt subtracted.");	}	}
开发者ID:arizona-phonological-imaging-lab,项目名称:ultrapraat,代码行数:10,


示例22: CategoriesEditorRemove_undo

static int CategoriesEditorRemove_undo (CategoriesEditorRemove me) {	CategoriesEditor editor = (CategoriesEditor) my boss;	Categories categories = (Categories) editor -> data;	for (long i = 1; i <= my nSelected; i++) {		autoSimpleString item = Data_copy ((SimpleString) my categories -> item[i]);		Ordered_addItemAtPosition_move (categories, item.move(), my selection[i]);	}	update (editor, my selection[1], 0, my selection, my nSelected);	return 1;}
开发者ID:motiz88,项目名称:praat,代码行数:11,


示例23: Transition_power

Transition Transition_power (Transition me, long power) {	try {		autoTransition thee = Data_copy (me);		autoTransition him = Data_copy (me);		for (long ipow = 2; ipow <= power; ipow ++) {			double **tmp = his data; his data = thy data; thy data = tmp;   // OPTIMIZE			for (long irow = 1; irow <= my numberOfStates; irow ++) {				for (long icol = 1; icol <= my numberOfStates; icol ++) {					thy data [irow] [icol] = 0.0;					for (long i = 1; i <= my numberOfStates; i ++) {						thy data [irow] [icol] += his data [irow] [i] * my data [i] [icol];					}				}			}		}		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": power not computed.");	}}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:20,


示例24: PowerCepstrum_getPeakProminence_hillenbrand

double PowerCepstrum_getPeakProminence_hillenbrand (PowerCepstrum me, double pitchFloor, double pitchCeiling, double *qpeak) {	double slope, intercept, quefrency, peakdB;	PowerCepstrum_fitTiltLine (me, 0.001, 0, &slope, &intercept, 1, 1);	autoPowerCepstrum thee = Data_copy (me);	PowerCepstrum_subtractTiltLine_inline (thee.get(), slope, intercept, 1);	PowerCepstrum_getMaximumAndQuefrency (thee.get(), pitchFloor, pitchCeiling, 0, & peakdB, & quefrency);	if (qpeak) {		*qpeak = quefrency;	}	return peakdB;}
开发者ID:PaulBoersma,项目名称:praat,代码行数:11,


示例25: CategoriesEditorReplace_undo

static int CategoriesEditorReplace_undo (CategoriesEditorReplace me) {	CategoriesEditor editor = static_cast<CategoriesEditor> (my boss);	Categories categories = static_cast<Categories> (editor -> data);	for (long i = 1; i <= my nSelected; i++) {		autoSimpleString str = Data_copy ( (SimpleString) my categories -> item[i + 1]);		OrderedOfString_replaceItemPos (categories, str.move(), my selection[i]);	}	update (editor, my selection[1], my selection[my nSelected], my selection, my nSelected);	return 1;}
开发者ID:motiz88,项目名称:praat,代码行数:11,


示例26: Permutation_invert

Permutation Permutation_invert (Permutation me) {	try {		autoPermutation thee = Data_copy (me);		for (long i = 1; i <= my numberOfElements; i++) {			thy p[my p[i]] = i;		}		return thee.transfer();	} catch (MelderError) {		Melder_throw (me, ": not inverted.");	}}
开发者ID:Crisil,项目名称:praat,代码行数:11,


示例27: PointProcesses_difference

autoPointProcess PointProcesses_difference (PointProcess me, PointProcess thee) {	try {		autoPointProcess him = Data_copy (me);		for (long i = my nt; i >= 1; i --)			if (PointProcess_findPoint (thee, my t [i]))				PointProcess_removePoint (him.get(), i);		return him;	} catch (MelderError) {		Melder_throw (me, U" & ", thee, U": difference not computed.");	}}
开发者ID:READSEARCH,项目名称:praat,代码行数:11,


示例28: CategoriesEditorRemove_execute

static int CategoriesEditorRemove_execute (CategoriesEditorRemove me) {	CategoriesEditor editor = static_cast<CategoriesEditor> (my boss);	Categories categories = static_cast<Categories> (editor -> data);	for (long i = my nSelected; i >= 1; i--) {		autoSimpleString item = Data_copy ((SimpleString) categories -> item[my selection[i]]);		Ordered_addItemAtPosition_move (my categories.peek(), item.move(), 1);		Collection_removeItem (categories, my selection[i]);	}	update (editor, my selection[1], 0, nullptr, 0);	return 1;}
开发者ID:motiz88,项目名称:praat,代码行数:12,


示例29: CategoriesEditorReplace_execute

static int CategoriesEditorReplace_execute (CategoriesEditorReplace me) {	CategoriesEditor editor = static_cast<CategoriesEditor> (my boss);	Categories categories = static_cast<Categories> (editor -> data);	for (long i = my nSelected; i >= 1; i--) {		autoSimpleString str = Data_copy ((SimpleString) my categories -> item[1]);		Ordered_addItemAtPosition_move (my categories.peek(), (SimpleString) categories -> item[my selection[i]], 2);   // YUCK		categories -> item[my selection[i]] = str.releaseToAmbiguousOwner();	}	update (editor, my selection[1], my selection[my nSelected], my selection, my nSelected);	return 1;}
开发者ID:motiz88,项目名称:praat,代码行数:12,



注:本文中的Data_copy函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ Data_custom_val函数代码示例
C++ Data_Wrap_Struct函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。