static void OTGrammarCandidate_init (OTGrammarCandidate me, int ncons, int v1, int v2) { my output = Melder_dup (Melder_cat (vowels [v1], U"t", vowels [v2])); my marks = NUMvector <int> (1, my numberOfConstraints = ncons); /* * Count vowel-gesture violations. */ countVowelViolations (my marks, ncons, v1); countVowelViolations (my marks, ncons, v2); /* * Count contour-gesture violations. */ if (isatr (v1) != isatr (v2)) my marks [5] ++; }
static void OTGrammarCandidate_init (OTGrammarCandidate me, int ncons, int v1, int v2) { wchar_t buffer [100]; swprintf (buffer, 100, L"%lst%ls", vowels [v1], vowels [v2]); my output = Melder_wcsdup (buffer); my marks = NUMvector <int> (1, my numberOfConstraints = ncons); /* * Count vowel-gesture violations. */ countVowelViolations (my marks, ncons, v1); countVowelViolations (my marks, ncons, v2); /* * Count contour-gesture violations. */ if (isatr (v1) != isatr (v2)) my marks [5] ++; }