{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# _`automaton`_`.info(key=None, detailed=False)`\n",
"\n",
"A dictionary of facts about an automaton.\n",
"\n",
"Arguments:\n",
"- `keys`: if specified, return just the corresponding result.\n",
"- `detailed`: also provide facts costly to compute.\n",
"\n",
"See also:\n",
"- [automaton.context](automaton.context.ipynb)\n",
"- [automaton.format](automaton.format.ipynb)\n",
"- [automaton.type](automaton.type.ipynb)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Examples"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n",
"\n",
"\n"
],
"text/plain": [
"mutable_automaton, q>>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import vcsn\n",
"a = vcsn.Q.expression('(<1/2>a*+<1/3>b*)*').automaton()\n",
"a"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"{'is codeterministic': False,\n",
" 'is complete': True,\n",
" 'is deterministic': True,\n",
" 'is empty': False,\n",
" 'is eps-acyclic': True,\n",
" 'is normalized': False,\n",
" 'is proper': True,\n",
" 'is standard': True,\n",
" 'is trim': True,\n",
" 'is useless': False,\n",
" 'is valid': True,\n",
" 'number of accessible states': 3,\n",
" 'number of coaccessible states': 3,\n",
" 'number of codeterministic states': 1,\n",
" 'number of deterministic states': 3,\n",
" 'number of final states': 3,\n",
" 'number of initial states': 1,\n",
" 'number of lazy states': 0,\n",
" 'number of spontaneous transitions': 0,\n",
" 'number of states': 3,\n",
" 'number of transitions': 6,\n",
" 'number of useful states': 3,\n",
" 'type': 'mutable_automaton, q>'}"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.info()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"{'is ambiguous': False,\n",
" 'is codeterministic': False,\n",
" 'is complete': True,\n",
" 'is cycle ambiguous': False,\n",
" 'is deterministic': True,\n",
" 'is empty': False,\n",
" 'is eps-acyclic': True,\n",
" 'is normalized': False,\n",
" 'is proper': True,\n",
" 'is standard': True,\n",
" 'is synchronizing': True,\n",
" 'is trim': True,\n",
" 'is useless': False,\n",
" 'is valid': True,\n",
" 'number of accessible states': 3,\n",
" 'number of coaccessible states': 3,\n",
" 'number of codeterministic states': 1,\n",
" 'number of deterministic states': 3,\n",
" 'number of final states': 3,\n",
" 'number of initial states': 1,\n",
" 'number of lazy states': 0,\n",
" 'number of spontaneous transitions': 0,\n",
" 'number of states': 3,\n",
" 'number of strongly connected components': 2,\n",
" 'number of transitions': 6,\n",
" 'number of useful states': 3,\n",
" 'type': 'mutable_automaton, q>'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.info(detailed=True)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'mutable_automaton, q>'"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.info('type')"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a.info('number of states')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
},
"widgets": {
"state": {},
"version": "1.1.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}