Skip to content

Commit 86ae42a

Browse files
committed
Agrego la estructura json DFA para usar en la api
1 parent 1ecbf63 commit 86ae42a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dfa_min_data.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ package dfa
33
// Partition represents a set of states
44
type Partition []State
55

6-
// State represent automata state with a numeric value
6+
// State represents an automata state with a numeric value
77
type State = int // Alias to int
88

99
type splitter struct {
10-
partition Partition
11-
input int
10+
partition Partition
11+
input int
1212
}
1313

1414
// DFA represents a finite automata
1515
type DFA struct {
16-
States Partition
17-
Alphabet []int
18-
InitialState State
19-
FinalStates Partition
20-
Delta map[State]map[int]State // Given state and symbol returns the state
16+
States Partition `json:"States"`
17+
Alphabet []int `json:"Alphabet"`
18+
InitialState State `json:"InitialState"`
19+
FinalStates Partition `json:"FinalStates"`
20+
Delta map[State]map[int]State `json:"Delta"` // Given state and symbol returns the state
2121
}
2222

2323
// Size returns the number of states of the automata

0 commit comments

Comments
 (0)