Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add a structure NAutomaton that permits to represent non-deterministi…
Browse files Browse the repository at this point in the history
…c automata, and add a transposition of deterministic automaton (that gives a non-deterministic one) and a function determinise to get back a deterministic automaton.
  • Loading branch information
mercatp committed Jun 16, 2015
1 parent 968d02a commit 65ba2ce
Show file tree
Hide file tree
Showing 6 changed files with 772 additions and 63 deletions.
28 changes: 28 additions & 0 deletions src/sage/combinat/words/Automaton.h
Expand Up @@ -20,3 +20,31 @@ struct Automate
// int nalloc; //usage interne, mémoire allouée
};
typedef struct Automate Automate;

///////////////////////////////////////////////////////
//Automates non déterministe
///////////////////////////////////////////////////////

struct Arete
{
int l; //label
int e; //état d'arrivée
};
typedef struct Arete Arete;

struct NEtat
{
Arete *a;
int n;
bool final;
bool initial;
};
typedef struct NEtat NEtat;

struct NAutomate
{
NEtat *e; //états
int n; //nombre d'états
int na; //nombre de lettres
};
typedef struct NAutomate NAutomate;

0 comments on commit 65ba2ce

Please sign in to comment.