コード例 #1
0
ファイル: Configuration.cpp プロジェクト: motiz88/praat
autoConfiguration TableOfReal_to_Configuration (TableOfReal me) {
	try {
		autoConfiguration thee = Configuration_create (my numberOfRows, my numberOfColumns);

		NUMmatrix_copyElements (my data, thy data, 1, my numberOfRows, 1, my numberOfColumns);
		TableOfReal_copyLabels (me, thee.peek(), 1, 1);
		return thee;
	} catch (MelderError) {
		Melder_throw (me, U": not converted.");
	}
}
コード例 #2
0
ファイル: Discriminant.cpp プロジェクト: rlaboiss/praat
autoConfiguration Discriminant_and_TableOfReal_to_Configuration (Discriminant me, TableOfReal thee, long numberOfDimensions) {
    try {
        if (numberOfDimensions == 0) {
            numberOfDimensions = Discriminant_getNumberOfFunctions (me);
        }
        autoConfiguration him = Configuration_create (thy numberOfRows, numberOfDimensions);
        Eigen_and_TableOfReal_into_TableOfReal_projectRows (my eigen.get(), thee, 1, him.get(), 1, numberOfDimensions);
        TableOfReal_copyLabels (thee, him.get(), 1, 0);
        TableOfReal_setSequentialColumnLabels (him.get(), 0, 0, U"Eigenvector ", 1, 1);
        return him;
    } catch (MelderError) {
        Melder_throw (U"Configuration not created.");
    }
}