• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Melder_integer函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Pitch_difference

void Pitch_difference (Pitch me, Pitch thee) {
	long nuvtov = 0, nvtouv = 0, ndfdown = 0, ndfup = 0;
	if (my nx != thy nx || my dx != thy dx || my x1 != thy x1) {
		Melder_flushError ("Pitch_difference: these Pitches are not aligned.");
		return;
	}
	for (long i = 1; i <= my nx; i ++) {
		double myf = my frame [i]. candidate [1]. frequency, thyf = thy frame [i]. candidate [1]. frequency;
		int myUnvoiced = myf == 0 || myf > my ceiling;
		int thyUnvoiced = thyf == 0 || thyf > thy ceiling;
		double t = Sampled_indexToX (me, i);
		if (myUnvoiced && ! thyUnvoiced) {
			Melder_casual ("Frame %ld time %f: unvoiced to voiced.", i, t);
			nuvtov ++;
		} else if (! myUnvoiced && thyUnvoiced) {
			Melder_casual ("Frame %ld time %f: voiced to unvoiced.", i, t);
			nvtouv ++;
		} else if (! myUnvoiced && ! thyUnvoiced) {
			if (myf > thyf) {
				//Melder_casual ("Frame %ld time %f: downward frequency jump from %.5g Hz to %.5g Hz.", i, t, myf, thyf);
				ndfdown ++;
			} else if (myf < thyf) {
				//Melder_casual ("Frame %ld time %f: upward frequency jump from %.5g Hz to %.5g Hz.", i, t, myf, thyf);
				ndfup ++;
			}
		}
	}
	MelderInfo_open ();
	MelderInfo_writeLine (L"Difference between two Pitches:");
	MelderInfo_writeLine (L"Unvoiced to voiced: ", Melder_integer (nuvtov), L" frames.");
	MelderInfo_writeLine (L"Voiced to unvoiced: ", Melder_integer (nvtouv), L" frames.");
	MelderInfo_writeLine (L"Downward frequency jump: ", Melder_integer (ndfdown), L" frames.");
	MelderInfo_writeLine (L"Upward frequency jump: ", Melder_integer (ndfup), L" frames.");
	MelderInfo_close ();
}
开发者ID:arizona-phonological-imaging-lab,项目名称:ultrapraat,代码行数:35,代码来源:Pitch.cpp


示例2: Distributions_Transition_map

Distributions Distributions_Transition_map (Distributions me, Transition map) {
	Distributions thee = NULL;

	/*
	 * Preconditions: matrix matching.
	 */
	if (map -> numberOfStates != my numberOfRows)
		error5 (L"Number of data (", Melder_integer (map -> numberOfStates), L") in mapping matrix "
			"does not match number of data (", Melder_integer (my numberOfRows), L") in distribution.")

	/*
	 * Create the output object.
	 */
	thee = (structDistributions *)Data_copy (me); cherror

	/*
	 * Compute the elements of the surface distributions.
	 */
	for (long row = 1; row <= my numberOfRows; row ++) for (long col = 1; col <= my numberOfColumns; col ++) {
		thy data [row] [col] = 0.0;
		for (long m = 1; m <= map -> numberOfStates; m ++)
			thy data [row] [col] += my data [m] [col] * map -> data [m] [row];
	}

end:
	iferror {
		forget (thee);
		return (structDistributions *)Melder_errorp1 (L"Distributions & Transition: Mapping not performed.");
	}
	return thee;
}
开发者ID:alekstorm,项目名称:tala,代码行数:31,代码来源:Distributions_and_Transition.cpp


示例3: v_info

void structWordList :: v_info () {
	structData :: v_info ();
	long n = WordList_count (this);
	if (! length) length = wcslen (string);
	MelderInfo_writeLine2 (L"Number of words: ", Melder_integer (n));
	MelderInfo_writeLine2 (L"Number of characters: ", Melder_integer (length - n));
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:7,代码来源:WordList.cpp


示例4: MelderString_empty

void ButtonEditor::drawMenuCommand (praat_Command cmd, long i) {
    static MelderString text = { 0 };
    int isAdded = cmd -> uniqueID != 0 || cmd -> script != NULL;
    int isHidden = cmd -> hidden;
    int isToggled = cmd -> toggled;
    const wchar_t *clickText = isHidden ? (isToggled ? (isAdded ? L"REMOVED" : L"HIDDEN") : L"hidden") :
                               (isToggled ? L"SHOWN" :  (isAdded ? (cmd -> uniqueID ? L"ADDED" : L"START-UP") : L"shown"));
    MelderString_empty (& text);
    if (cmd -> unhidable) {
        MelderString_append1 (& text, L"#unhidable ");
    } else {
        MelderString_append5 (& text, L"@@m", Melder_integer (i), L"|", clickText, L"@ ");
    }
    MelderString_append2 (& text, cmd -> window, L": ");
    if (cmd -> menu) {
        MelderString_append2 (& text, cmd -> menu, L": ");
    }
    if (cmd -> title) {
        if (cmd -> executable) {
            MelderString_append5 (& text, L"@@p", Melder_integer (i), L"|", cmd -> title, L"@");
        } else {
            MelderString_append1 (& text, cmd -> title);
        }
    } else {
        MelderString_append1 (& text, L"---------");
    }
    if (cmd -> after) {
        MelderString_append3 (& text, L", %%%%after \"", cmd -> after, L"\"%%");
    }
    if (cmd -> script) {
        MelderString_append3 (& text, L", script \"", Melder_peekExpandBackslashes (cmd -> script), L"\"");
    }
    any (text.string, _font, _fontSize, cmd -> callback ? 0 : Graphics_ITALIC, 0.0,
         cmd -> depth * 0.3, 0.4, 0.0, 0.0, 0);
}
开发者ID:spirineta,项目名称:tala,代码行数:35,代码来源:ButtonEditor.cpp


示例5: Minimizer_minimizeManyTimes

void Minimizer_minimizeManyTimes (Minimizer me, long numberOfTimes, long maxIterationsPerTime, double tolerance) {
	double fopt = my minimum;
	int monitorSingle = numberOfTimes == 1;

	autoNUMvector<double> popt (NUMvector_copy<double> (my p, 1, my nParameters), 1);

	if (! monitorSingle) {
		Melder_progress (0.0, L"Minimize many times");
	}
	/* on first iteration start with current parameters 27/11/97 */
	for (long i = 1; i <= numberOfTimes; i++) {
		Minimizer_minimize (me, maxIterationsPerTime, tolerance, monitorSingle);
		Melder_casual ("Current %ld: minimum = %.17g", i, my minimum);
		if (my minimum < fopt) {
			NUMvector_copyElements (my p, popt.peek(), 1, my nParameters);
			fopt = my minimum;
		}
		Minimizer_reset (me, 0);
		if (! monitorSingle) {
			try {
				Melder_progress ( (double) i / numberOfTimes, Melder_integer (i), L" from ",
				                   Melder_integer (numberOfTimes)); therror
			} catch (MelderError) {
				Melder_clearError ();   // interrurpt, no error
				break;
			}
		}
	}
	if (! monitorSingle) {
		Melder_progress (1.0, 0);
	}
	Minimizer_reset (me, popt.peek());
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:33,代码来源:Minimizers.cpp


示例6: v_writeText

void structPolygon :: v_writeText (MelderFile file) {
	texputi4 (file, our numberOfPoints, U"numberOfPoints", 0,0,0,0,0);
	for (long i = 1; i <= our numberOfPoints; i ++) {
		texputr4 (file, our x [i], U"x [", Melder_integer (i), U"]", 0,0,0);
		texputr4 (file, our y [i], U"y [", Melder_integer (i), U"]", 0,0,0);
	}
}
开发者ID:psibre,项目名称:praat,代码行数:7,代码来源:Polygon.cpp


示例7: CCA_and_TableOfReal_scores

TableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfFactors)
{
	TableOfReal him = NULL;
	long n = thy numberOfRows;
	long nx = my x -> dimension, ny = my y -> dimension;

	if (ny + nx != thy numberOfColumns) return Melder_errorp7 (L"The number "
		"of columns in the table (", Melder_integer (thy numberOfColumns), L") does not agree with "
		"the dimensions of the CCA object (ny + nx = ", Melder_integer (ny), L" + ", Melder_integer (nx), L").");

	if (numberOfFactors == 0) numberOfFactors = my numberOfCoefficients;
	if (numberOfFactors < 1 || numberOfFactors > my numberOfCoefficients)
		return Melder_errorp3 (L"The number of factors must be in interval "
			"[1, ", Melder_integer (my numberOfCoefficients), L"].");
	
	him = TableOfReal_create (n, 2 * numberOfFactors);
	if (him == NULL) return NULL;

	if (! NUMstrings_copyElements (thy rowLabels, his rowLabels, 1, thy numberOfRows) ||
		! Eigen_and_TableOfReal_project_into (my y, thee, 1, ny, &him, 1, numberOfFactors) ||
		! Eigen_and_TableOfReal_project_into (my x, thee, ny + 1,
			thy numberOfColumns, &him, numberOfFactors + 1, his numberOfColumns) ||
		! TableOfReal_setSequentialColumnLabels (him, 1, numberOfFactors, L"y_", 1, 1) ||
		! TableOfReal_setSequentialColumnLabels (him, numberOfFactors + 1,
			his numberOfColumns, L"x_", 1, 1)) forget (him);

	return him;
}
开发者ID:alekstorm,项目名称:tala,代码行数:28,代码来源:CCA.c


示例8: info

static void info (I)
{
	iam (CCA);
	classData -> info (me);
	MelderInfo_writeLine2 (L"Number of coefficients: ", Melder_integer (my numberOfCoefficients));
	MelderInfo_writeLine2 (L"ny: ", Melder_integer (my y -> dimension));
	MelderInfo_writeLine2 (L"nx: ", Melder_integer (my x -> dimension));
}
开发者ID:alekstorm,项目名称:tala,代码行数:8,代码来源:CCA.c


示例9: FFNet_createNameFromTopology

void FFNet_createNameFromTopology (FFNet me, MelderString *name)
{
	MelderString_append1 (name, Melder_integer (my nUnitsInLayer[0]));
	for (long i = 1; i <= my nLayers; i++)
	{
		MelderString_append2 (name, L"-", Melder_integer (my nUnitsInLayer[i]));
	}
}
开发者ID:alekstorm,项目名称:tala,代码行数:8,代码来源:FFNet.c


示例10: v_info

void structTube :: v_info () {
	structData :: v_info ();
	MelderInfo_writeLine5 (L"Time domain: ", Melder_double (xmin), L" to ", Melder_double (xmax), L" seconds");
	MelderInfo_writeLine2 (L"Maximum number of segments: ", Melder_integer (maxnSegments));
	MelderInfo_writeLine2 (L"Number of frames: ", Melder_integer (nx));
	MelderInfo_writeLine3 (L"Time step: ", Melder_double (dx), L" seconds");
	MelderInfo_writeLine3 (L"First frame at: ", Melder_double (x1), L" seconds");
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:8,代码来源:Tube.cpp


示例11: v_info

void structLPC :: v_info () {
	structData :: v_info ();
	MelderInfo_writeLine (L"Time domain: ", Melder_double (xmin), L" to ", Melder_double (xmax),
	                       L" (s).");
	MelderInfo_writeLine (L"Prediction order: ", Melder_integer (maxnCoefficients));
	MelderInfo_writeLine (L"Number of frames: ", Melder_integer (nx));
	MelderInfo_writeLine (L"Time step: ", Melder_double (dx), L" (s).");
	MelderInfo_writeLine (L"First frame at: ", Melder_double (x1), L" (s).");
}
开发者ID:Crisil,项目名称:praat,代码行数:9,代码来源:LPC.cpp


示例12: v_info

void structCrossCorrelationTables :: v_info () {
	structOrdered :: v_info ();
	CrossCorrelationTable thee = (CrossCorrelationTable) item[1];
	MelderInfo_writeLine (L"  Number of rows and columns: ", Melder_integer (thy numberOfRows));
	for (long i = 1; i <= size; i++) {
		double dm = CrossCorrelationTable_getDiagonalityMeasure ( (CrossCorrelationTable) item[i]);
		MelderInfo_writeLine (L"Diagonality measure for item ", Melder_integer (i), L": ", Melder_double (dm));
	}
}
开发者ID:arizona-phonological-imaging-lab,项目名称:ultrapraat,代码行数:9,代码来源:ICA.cpp


示例13: _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,代码来源:Sound_and_LPC.cpp


示例14: TextGrid_checkStartAndEndTimesOfTiers

static void TextGrid_checkStartAndEndTimesOfTiers (TextGrid me) {
	for (long itier = 1; itier <= my tiers -> size; itier++) {
		Function tier = (Function) my tiers -> item[itier];
		if (tier -> xmin != my xmin) {
			Melder_throw (me, ": the start time of tier ", Melder_integer (itier), " does not match the start time of its TextGrid.");
		} else if (tier -> xmax != my xmax) {
			Melder_throw (me, ": the end time of tier ", Melder_integer (itier), " does not match the end time of its TextGrid.");
		}
	}
}
开发者ID:Crisil,项目名称:praat,代码行数:10,代码来源:TextGrid_extensions.cpp


示例15: v_info

void structCC :: v_info () {
	structData :: v_info ();
	MelderInfo_writeLine5 (L"Time domain:", Melder_double (xmin), L" to ", Melder_double (xmax), L" seconds");
	MelderInfo_writeLine2 (L"Number of frames: ", Melder_integer (nx));
	MelderInfo_writeLine3 (L"Time step: ", Melder_double (dx), L" seconds");
	MelderInfo_writeLine3 (L"First frame at: ", Melder_double (x1), L" seconds");
	MelderInfo_writeLine2 (L"Number of coefficients: ", Melder_integer (maximumNumberOfCoefficients));
	MelderInfo_writeLine3 (L"Minimum frequency: ", Melder_double (fmin), L" Hz");
	MelderInfo_writeLine3 (L"Maximum frequency: ", Melder_double (fmax), L" Hz");
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:10,代码来源:CC.cpp


示例16: Sound_to_BarkSpectrogram

BarkSpectrogram Sound_to_BarkSpectrogram (Sound me, double analysisWidth, double dt, double f1_bark, double fmax_bark, double df_bark) {
	try {
		double nyquist = 0.5 / my dx, samplingFrequency = 2 * nyquist;
		double windowDuration = 2 * analysisWidth; /* gaussian window */
		double zmax = NUMhertzToBark2 (nyquist);
		double fmin_bark = 0;

		// Check defaults.

		if (f1_bark <= 0) {
			f1_bark = 1;
		}
		if (fmax_bark <= 0) {
			fmax_bark = zmax;
		}
		if (df_bark <= 0) {
			df_bark = 1;
		}

		fmax_bark = MIN (fmax_bark, zmax);
		long numberOfFilters = floor ( (fmax_bark - f1_bark) / df_bark + 0.5);
		if (numberOfFilters <= 0) {
			Melder_throw ("The combination of filter parameters is not valid.");
		}

		long numberOfFrames; double t1;
		Sampled_shortTermAnalysis (me, windowDuration, dt, & numberOfFrames, & t1);
		autoSound sframe = Sound_createSimple (1, windowDuration, samplingFrequency);
		autoSound window = Sound_createGaussian (windowDuration, samplingFrequency);
		autoBarkSpectrogram thee = BarkSpectrogram_create (my xmin, my xmax, numberOfFrames, dt, t1, fmin_bark, fmax_bark, numberOfFilters, df_bark, f1_bark);

		autoMelderProgress progess (L"BarkSpectrogram analysis");

		for (long iframe = 1; iframe <= numberOfFrames; iframe++) {
			double t = Sampled_indexToX (thee.peek(), iframe);

			Sound_into_Sound (me, sframe.peek(), t - windowDuration / 2);
			Sounds_multiply (sframe.peek(), window.peek());
			Sound_into_BarkSpectrogram_frame (sframe.peek(), thee.peek(), iframe);

			if ((iframe % 10) == 1) {
				Melder_progress ( (double) iframe / numberOfFrames,  L"BarkSpectrogram analysis: frame ",
					Melder_integer (iframe), L" from ", Melder_integer (numberOfFrames), L".");
			}
		}
		
		_Spectrogram_windowCorrection ((Spectrogram) thee.peek(), window -> nx);

		return thee.transfer();
	} catch (MelderError) {
		Melder_throw (me, ": no BarkSpectrogram created.");
	}
}
开发者ID:Crisil,项目名称:praat,代码行数:53,代码来源:Sound_and_Spectrogram_extensions.cpp


示例17: FFNet_and_TabelOfReal_to_FFNet

FFNet FFNet_and_TabelOfReal_to_FFNet (FFNet me, TableOfReal him, long layer)
{
	FFNet thee = NULL; long i, node = 1;
	
	if (! FFNet_checkLayerNumber (me, layer)) return NULL;
	if ((my nUnitsInLayer[layer] != his numberOfColumns) || 
		(my nUnitsInLayer[layer] == his numberOfColumns && my nUnitsInLayer[layer-1]+1 == his numberOfRows))
	{
		long i, try[3], rows[3], cols[3], ntry = my nLayers > 3 ? 3 : my nLayers, ok = 0;
		if (my nLayers > 3) return Melder_errorp1 (L"Dimensions don't fit.");
		for (i = 1; i <= ntry; i++)
		{
			cols[i] = my nUnitsInLayer[i] == his numberOfColumns;
			rows[i] = my nUnitsInLayer[i - 1] + 1 == his numberOfRows;
			try[i] = rows[i] && cols[i];
			if (try[i]) ok ++;
		}
		if (! rows[layer])
			(void)  Melder_error3 (L"The number of rows in the TableOfReal does not equal \n"
				"the number of units in the layer that connect to layer ", Melder_integer (layer), L".\n");
		else
			(void)  Melder_error3 (L"The number of columns in the TableOfReal does not equal \n"
				"the number of units in layer ", Melder_integer (layer), L".\n");
		if (ok == 0)
			return Melder_errorp1 (L"Please quit, there is no appropriate layer in the FFNet for this TableOfReal.");
		else
		{
			if (ok == 1)
				return Melder_errorp3 (L"Please try again with layer number ", 
					Melder_integer (try[1] ? try[1] : (try[2] ? try[2] : try[3])), L".");
			else
				return Melder_errorp1 (L"Please try again with one of the other two layer numbers.");
		}
	}
	thee = Data_copy (me);
	if (thee == NULL) return NULL;
	for (i = 0; i < layer; i++)
	{
		node += thy nUnitsInLayer[i] + 1;
	}
	for (i = 1; i <= thy nUnitsInLayer[layer]; i++, node++)
	{
		long j, k = 1;
		for (j = thy wFirst[node]; j <= thy wLast[node]; j++, k++)
		{
			 thy w[j] = his data[k][i];
		}
	}
	return thee;
}
开发者ID:alekstorm,项目名称:tala,代码行数:50,代码来源:FFNet.c


示例18: FileInMemory_showAsCode

void FileInMemory_showAsCode (FileInMemory me, const wchar_t *name, long numberOfBytesPerLine)
{
	if (numberOfBytesPerLine <= 0) numberOfBytesPerLine = 20;
	// autoNUMvector<unsigned char> data (0, my d_numberOfBytes); ????
	MelderInfo_writeLine5 (L"\t\tstatic unsigned char ", name, L"_data[", Melder_integer (my d_numberOfBytes+1), L"] = {");
	for (long i = 0; i < my d_numberOfBytes; i++) {
		unsigned char number = my d_data[i];
		MelderInfo_write4 ((i % numberOfBytesPerLine == 0 ? L"\t\t\t" : L""), Melder_integer (number), L",",
			((i % numberOfBytesPerLine  == (numberOfBytesPerLine - 1)) ? L"\n" : L" "));
	}
	MelderInfo_writeLine1 ((my d_numberOfBytes - 1) % numberOfBytesPerLine == (numberOfBytesPerLine - 1) ? L"\t\t\t0};" : L"0};");
	MelderInfo_write3 (L"\t\tautoFileInMemory ", name, L" = FileInMemory_createWithData (");
	MelderInfo_writeLine8 (Melder_integer (my d_numberOfBytes), L", reinterpret_cast<const char *> (&", name, L"_data), \n\t\t\tL\"", my d_path, L"\", \n\t\t\tL\"", my d_id, L"\");");
}
开发者ID:georgiee,项目名称:lip-sync-lpc,代码行数:14,代码来源:FileInMemory.cpp


示例19: FFNet_Activation_to_Categories

Categories FFNet_Activation_to_Categories (FFNet me, Activation activation, int labeling)
{
	Categories thee = NULL, categories = my outputCategories;
	long i, (*labelingFunction) (I, const double act[]);
	
	if (! my outputCategories)
	{
		(void) Melder_error1 (L"FFNet & Activation: To Categories\n");
		return Melder_errorp1 (L"The neural net has no Categories (has the FFNet been trained yet?).");
	}
	if (my nOutputs != activation->nx)
	{
		(void) Melder_error1 (L"FFNet & Activation: To Categories\n");
		return Melder_errorp1 (L"The number of columns in the Activation must equal the number of outputs of FFNet.");
	}
	thee = Categories_create ();
	if (thee == NULL) return NULL;
	labelingFunction = labeling == 2 ? stochastic : winnerTakesAll;
	for (i = 1; i <= activation->ny; i++)
	{
		long index = labelingFunction (me, activation->z[i]);
		Data item = Data_copy (categories->item[index]);
		if (item == NULL || ! Collection_addItem (thee, item)) 
		{
			forget (thee);
			return Melder_errorp3 (L"FFNet & Activation: To Categories\n\nError creating label ",
				Melder_integer (i), L".");
		}
	}
	return thee;
}
开发者ID:alekstorm,项目名称:tala,代码行数:31,代码来源:FFNet_Activation_Categories.c


示例20: info

static void info (I) {
	iam (RealTier);
	classFunction -> info (me);
	MelderInfo_writeLine2 (L"Number of points: ", Melder_integer (my points -> size));
	MelderInfo_writeLine2 (L"Minimum value: ", Melder_double (RealTier_getMinimumValue (me)));
	MelderInfo_writeLine2 (L"Maximum value: ", Melder_double (RealTier_getMaximumValue (me)));
}
开发者ID:alekstorm,项目名称:tala,代码行数:7,代码来源:RealTier.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MemAlloc函数代码示例发布时间:2022-05-30
下一篇:
C++ Melder_help函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap