Class Mealy2ETFWriterIO<I,O>
- java.lang.Object
-
- net.automatalib.serialization.etf.writer.AbstractETFWriter<I,MealyMachine<?,I,?,O>>
-
- net.automatalib.serialization.etf.writer.Mealy2ETFWriterIO<I,O>
-
- Type Parameters:
I
- the input typeO
- the output type
- All Implemented Interfaces:
InputModelSerializer<I,MealyMachine<?,I,?,O>>
,ModelSerializer<InputModelData<I,MealyMachine<?,I,?,O>>>
public final class Mealy2ETFWriterIO<I,O> extends AbstractETFWriter<I,MealyMachine<?,I,?,O>>
Write a Mealy machine with straightforward IO semantics.
-
-
Constructor Summary
Constructors Constructor Description Mealy2ETFWriterIO()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <I,O>
Mealy2ETFWriterIO<I,O>getInstance()
protected void
writeEdge(PrintWriter pw)
Write the edge type.protected void
writeETF(PrintWriter pw, MealyMachine<?,I,?,O> mealy, Alphabet<I> inputs)
Write ETF parts specific for Mealy machines with IO semantics.void
writeModel(OutputStream os, MealyMachine<?,I,?,O> model, Alphabet<I> alphabet)
Writes the model to the given output stream.-
Methods inherited from class net.automatalib.serialization.etf.writer.AbstractETFWriter
write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.serialization.InputModelSerializer
writeModel, writeModel
-
Methods inherited from interface net.automatalib.serialization.ModelSerializer
writeModel
-
-
-
-
Method Detail
-
writeEdge
protected void writeEdge(PrintWriter pw)
Write the edge type. An edge has two edge labels: input of type input, and output of type output.- Specified by:
writeEdge
in classAbstractETFWriter<I,MealyMachine<?,I,?,O>>
- Parameters:
pw
- the Writer.
-
writeETF
protected void writeETF(PrintWriter pw, MealyMachine<?,I,?,O> mealy, Alphabet<I> inputs)
Write ETF parts specific for Mealy machines with IO semantics.Writes: - the initial state, - the valuations for the state ids, - the transitions, - the input alphabet (for the input labels on edges), - the output alphabet (for the output labels on edges).
- Specified by:
writeETF
in classAbstractETFWriter<I,MealyMachine<?,I,?,O>>
- Parameters:
pw
- the Writer.mealy
- the Mealy machine to write.inputs
- the alphabet.
-
writeModel
public void writeModel(OutputStream os, MealyMachine<?,I,?,O> model, Alphabet<I> alphabet)
Description copied from interface:InputModelSerializer
Writes the model to the given output stream.Note: the output stream will not be closed.
- Parameters:
os
- the output stream to write tomodel
- the model to writealphabet
- the inputs of the model to which serialization should be limited
-
getInstance
public static <I,O> Mealy2ETFWriterIO<I,O> getInstance()
-
-