FLAME
devel
Main Page
Related Pages
Classes
Files
All
Classes
Functions
Variables
Typedefs
Enumerations
Pages
FLAME documentation
Getting Started
API Usage (C++ and Python)
examples/sim.py
1
#!/usr/bin/env python
2
3
import
sys
4
"[includes]"
5
from
flame
import
Machine
6
"[includes]"
7
8
"[Parse lattice file]"
9
with open(sys.argv[1],
"
r") as F:
10
mymachine =
Machine
(F)
11
"[Parse lattice file]"
12
13
"[Allocate State]"
14
thestate = mymachine.allocState({})
15
"[Allocate State]"
16
17
print
"Initial state"
, thestate
18
19
"[Run simulation]"
20
mymachine.propagate(thestate)
21
"[Run simulation]"
22
23
print
"Final state"
, thestate
Generated on Mon Jul 18 2016 13:55:45 for FLAME by
1.8.8