Class PredictionUtils

java.lang.Object
eu.qualimaster.easy.extension.internal.PredictionUtils

public class PredictionUtils extends Object
Some utility methods for algorithm predictions.
Author:
Holger Eichelberger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static <K, V> Map<K,V>
    toMappedMap(net.ssehub.easy.instantiation.core.model.vilTypes.Map<K,V> map)
    Translates a VIL map to a Java map.
    (package private) static <K, KV, V> net.ssehub.easy.instantiation.core.model.vilTypes.Map<K,net.ssehub.easy.instantiation.core.model.vilTypes.Map<KV,V>>
    transferMap(Map<K,Map<KV,V>> res, Class<K> classK, Class<KV> classKV, Class<V> classV)
    Translates the Java result instance to a VIL result instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PredictionUtils

      public PredictionUtils()
  • Method Details

    • toMappedMap

      static <K, V> Map<K,V> toMappedMap(net.ssehub.easy.instantiation.core.model.vilTypes.Map<K,V> map)
      Translates a VIL map to a Java map.
      Type Parameters:
      K - the key type
      V - the value type
      Parameters:
      map - the map to be translated (may be null)
      Returns:
      the translated map (may be null if map is null)
    • transferMap

      static <K, KV, V> net.ssehub.easy.instantiation.core.model.vilTypes.Map<K,net.ssehub.easy.instantiation.core.model.vilTypes.Map<KV,V>> transferMap(Map<K,Map<KV,V>> res, Class<K> classK, Class<KV> classKV, Class<V> classV)
      Translates the Java result instance to a VIL result instance.
      Type Parameters:
      K - the main access key
      KV - the secondary access key to the internal map/values
      V - the value type
      Parameters:
      res - the Java result instance
      classK - the actual class of K
      classKV - the actual class of KV
      classV - the actual class of V
      Returns:
      the corresponding VIL result instance, always a result even if empty