public final class FSAUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FSAUtils.IntIntHolder |
Constructor and Description |
---|
FSAUtils() |
Modifier and Type | Method and Description |
---|---|
static TreeMap<Integer,Integer> |
calculateFanOuts(FSA fsa,
int root)
Calculate fan-out ratio (how many nodes have a given number of outgoing arcs).
|
static com.carrotsearch.hppc.IntIntHashMap |
rightLanguageForAllStates(FSA fsa)
Calculate the size of "right language" for each state in an FSA.
|
static String |
toDot(FSA fsa,
int node)
Returns the right-language reachable from a given FSA node, formatted as an
input for the graphviz package (expressed in the
dot
language). |
static void |
toDot(Writer w,
FSA fsa,
int node)
Saves the right-language reachable from a given FSA node, formatted as an
input for the graphviz package (expressed in the
dot
language), to the given writer. |
public static String toDot(FSA fsa, int node)
dot
language).fsa
- The automaton to visualize.node
- Starting node (subgraph will be visualized unless it's the automaton's root node).public static void toDot(Writer w, FSA fsa, int node) throws IOException
dot
language), to the given writer.w
- The writer to write dot language description of the automaton.fsa
- The automaton to visualize.node
- Starting node (subgraph will be visualized unless it's the automaton's root node).IOException
- Rethrown if an I/O exception occurs.public static TreeMap<Integer,Integer> calculateFanOuts(FSA fsa, int root)
fsa
- The automaton to calculate fanout for.root
- The starting node for calculations.public static com.carrotsearch.hppc.IntIntHashMap rightLanguageForAllStates(FSA fsa)
fsa
- The automaton to calculate right language for.Copyright © 2016. All rights reserved.