Class ConversionTools

java.lang.Object
org.tweetyproject.commons.util.ConversionTools

public class ConversionTools extends Object
This class provides some utility methods for converting different data types.
Author:
Matthias Thimm
  • Constructor Details

    • ConversionTools

      public ConversionTools()
  • Method Details

    • bigInteger2BinaryString

      public static String bigInteger2BinaryString(BigInteger value)
      Provides a string representation of the bits in the given BigInteger.
      Parameters:
      value - some BigInteger
      Returns:
      a string representation of the bits in the given BigInteger.
    • bigInteger2BitSet

      public static BitSet bigInteger2BitSet(BigInteger value)
      Creates a bit set from the given BigInteger.
      Parameters:
      value - value some BigInteger
      Returns:
      a bitset representing the BigInteger.
    • bitSet2BinaryString

      public static String bitSet2BinaryString(BitSet s)
      Provides a string representation of the bits in the given BitSet.
      Parameters:
      s - some BitSet
      Returns:
      a string representation of the bits in the given BitSet.
    • binaryString2BitSet

      public static BitSet binaryString2BitSet(String s)
      Creates a bit set from the given string of zeros and ones. Additional zeros are added to the prefix in, so that the string is aligned on the right side of the bitset
      Parameters:
      s - some string of zeros and ones
      Returns:
      a bitset representing the bitvector encoded by the string.