Package ffx.utilities

Class HistogramXmlAdapter

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,double[][]>
ffx.utilities.HistogramXmlAdapter

public class HistogramXmlAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,double[][]>
Write/read Histogram data to/from a String. The String is an array of lines separated by System dependent line separators. Each line (row) corresponds to a fixed lambda. The columns are a space-separated list of weights for the dUdL bins.
Since:
1.0
Author:
Michael J. Schnieders
See Also:
  • XmlAdapter
  • Field Details

    • logger

      public static final Logger logger
      The logger for this class.
  • Constructor Details

    • HistogramXmlAdapter

      public HistogramXmlAdapter()
      Default constructor.
  • Method Details

    • unmarshal

      public double[][] unmarshal(String value)
      Convert the histogram data string to a 2D double array.
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,double[][]>
      Parameters:
      value - String containing the Histogram data.
      Returns:
      The data.
    • marshal

      public String marshal(double[][] data)
      Convert the 2D histogram double array into a String.
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,double[][]>
      Parameters:
      data - The histogram data.
      Returns:
      A String representation of the data.