Example #1
0
autoContingencyTable TableOfReal_to_ContingencyTable (TableOfReal me) {
	try {
		TableOfReal_checkPositive (me);
		autoContingencyTable thee = Thing_new (ContingencyTable);
		my structTableOfReal :: v_copy (thee.get());
		return thee;
	} catch (MelderError) {
		Melder_throw (me, U": not converted to ContingencyTable.");
	}
}
ContingencyTable TableOfReal_to_ContingencyTable (I) {
	iam (TableOfReal);
	try {
		TableOfReal_checkPositive (me);
		autoContingencyTable thee = Thing_new (ContingencyTable);
		my structTableOfReal :: v_copy (thee.peek());
		return thee.transfer();
	} catch (MelderError) {
		Melder_throw (me, ": not converted to ContingencyTable.");
	}
}
Example #3
0
autoConfusion TableOfReal_to_Confusion (TableOfReal me) {
	try {
		if (! TableOfReal_checkPositive (me)) {
			Melder_throw (U"Elements may not be less than zero.");
		}
		autoConfusion thee = Thing_new (Confusion);
		my structTableOfReal :: v_copy (thee.get());
		return thee;
	} catch (MelderError) {
		Melder_throw (me, U": not converted to Confusion.");
	}
}