view Implab/Automaton/CDFADefinition.cs @ 163:419aa51b04fd ref20160224

JSON moved to Formats namespace Working in RegularDFA
author cin
date Wed, 24 Feb 2016 20:12:52 +0300
parents 0526412bbb26
children
line wrap: on
line source

namespace Implab.Automaton {
    public class CDFADefinition : DFADefinition {
        readonly CharAlphabet m_alphabet;

        public CharAlphabet Alphabet {
            get { return m_alphabet; }
        }

        public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) {
            m_alphabet = alphabet;
        }

        public CDFADefinition Optimize() {
            
            return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet());
        }

        public void PrintDFA() {
            PrintDFA(m_alphabet);
        }
    }
}