Tabnine Logo
InputModelData
Code IndexAdd Tabnine to your IDE (free)

How to use
InputModelData
in
net.automatalib.serialization

Best Java code snippets using net.automatalib.serialization.InputModelData (Showing top 11 results out of 315)

origin: net.automatalib/automata-serialization-learnlibv2

@Override
public InputModelData<Integer, DFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final CompactDFA<Integer> automaton = readGenericDFA(is);
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
origin: LearnLib/automatalib

@Override
public InputModelData<Integer, DFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final CompactDFA<Integer> automaton = readGenericDFA(is);
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
origin: net.automatalib/automata-serialization-taf

  @Override
  public InputModelData<String, MealyMachine<?, String, ?, String>> readModel(InputStream is) throws IOException {
    final CompactMealy<String, String> automaton =
        TAFParser.parseMealy(is, PrintStreamDiagnosticListener.getStderrDiagnosticListener());
    return new InputModelData<>(automaton, automaton.getInputAlphabet());
  }
}
origin: net.automatalib/automata-serialization-taf

  @Override
  public InputModelData<String, DFA<Integer, String>> readModel(InputStream is) throws IOException {
    final CompactDFA<String> automaton =
        TAFParser.parseDFA(is, PrintStreamDiagnosticListener.getStderrDiagnosticListener());
    return new InputModelData<>(automaton, automaton.getInputAlphabet());
  }
}
origin: LearnLib/automatalib

public <I> InputModelData<I, SimpleAutomaton<Integer, I>> parse(Function<String, I> inputTransformer)
    throws IOException {
  try (Reader isr = IOUtil.asUTF8Reader(inputStream);
     BufferedReader bisr = new BufferedReader(isr)) {
    // parsing
    parseHeader(bisr);
    while (parseTransition(bisr)) {}
    // automaton construction
    final Map<String, I> inputMap =
        alphabetSymbols.stream().collect(Collectors.toMap(Function.identity(), inputTransformer));
    final Alphabet<I> alphabet = Alphabets.fromCollection(inputMap.values());
    final CompactNFA<I> result = new CompactNFA<>(alphabet, transitionMap.size());
    for (int i = 0; i < transitionMap.size(); i++) {
      result.addState();
    }
    for (final Map.Entry<Integer, Map<String, Integer>> outgoing : transitionMap.entrySet()) {
      final Integer src = outgoing.getKey();
      for (final Map.Entry<String, Integer> targets : outgoing.getValue().entrySet()) {
        final String input = targets.getKey();
        final Integer dest = targets.getValue();
        result.addTransition(src, inputMap.get(input), dest);
      }
    }
    result.setInitial(initialState, true);
    return new InputModelData<>(result, alphabet);
  }
}
origin: LearnLib/automatalib

  @Override
  public InputModelData<String, MealyMachine<?, String, ?, String>> readModel(InputStream is)
      throws TAFParseException {
    final CompactMealy<String, String> automaton =
        TAFParser.parseMealy(is, PrintStreamDiagnosticListener.getStderrDiagnosticListener());
    return new InputModelData<>(automaton, automaton.getInputAlphabet());
  }
}
origin: LearnLib/automatalib

  @Override
  public InputModelData<String, DFA<Integer, String>> readModel(InputStream is) throws TAFParseException {
    final CompactDFA<String> automaton =
        TAFParser.parseDFA(is, PrintStreamDiagnosticListener.getStderrDiagnosticListener());
    return new InputModelData<>(automaton, automaton.getInputAlphabet());
  }
}
origin: LearnLib/automatalib

@Override
public InputModelData<Integer, NFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final InputStream uncompressedStream = IOUtil.asUncompressedInputStream(is);
  SAFInput in = new SAFInput(uncompressedStream);
  final CompactNFA<Integer> automaton = in.readNativeNFA();
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
origin: net.automatalib/automata-serialization-saf

@Override
public InputModelData<Integer, DFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final InputStream uncompressedStream = IOUtil.asUncompressedInputStream(is);
  SAFInput in = new SAFInput(uncompressedStream);
  final CompactDFA<Integer> automaton = in.readNativeDFA();
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
origin: net.automatalib/automata-serialization-saf

@Override
public InputModelData<Integer, NFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final InputStream uncompressedStream = IOUtil.asUncompressedInputStream(is);
  SAFInput in = new SAFInput(uncompressedStream);
  final CompactNFA<Integer> automaton = in.readNativeNFA();
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
origin: LearnLib/automatalib

@Override
public InputModelData<Integer, DFA<Integer, Integer>> readModel(InputStream is) throws IOException {
  final InputStream uncompressedStream = IOUtil.asUncompressedInputStream(is);
  SAFInput in = new SAFInput(uncompressedStream);
  final CompactDFA<Integer> automaton = in.readNativeDFA();
  return new InputModelData<>(automaton, automaton.getInputAlphabet());
}
net.automatalib.serializationInputModelData

Javadoc

A utility data class, that allows to pair a model that can react to input symbols with a corresponding alphabet.

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now