public CharacterFunction(char current) { this.current = current; this.occurrences = 0; this.totalNexts = 0; nextChars = new CharInstance[26]; for (char i = 'a'; i <= 'z'; i++) { nextChars[i - 'a'] = new CharInstance() { character = i, occurrences = 0 }; } }
public CharacterFunction(char current) { this.current = current; this.occurrences = 0; this.totalNexts = 0; nextChars = new CharInstance[26]; for (char c = 'a'; c <= 'z'; ++c) { nextChars[c - 'a'] = new CharInstance() { character = c, occurrences = 0 }; } }