Class Instance

    • Field Detail

      • REPORT_DATASET

        public static final String REPORT_DATASET
        the key in the report for the dataset name.
        See Also:
        Constant Field Values
      • REPORT_DISPLAY_ID

        public static final String REPORT_DISPLAY_ID
        the key in the report for the display ID.
        See Also:
        Constant Field Values
      • REPORT_ADDITIONAL_PREFIX

        public static final String REPORT_ADDITIONAL_PREFIX
        the key prefix in the report for the additional attributes.
        See Also:
        Constant Field Values
      • m_DatasetHeader

        protected weka.core.Instances m_DatasetHeader
        a reference to the dataset the data was obtained from.
      • m_Report

        protected Report m_Report
        the automatically generated report.
      • m_Notes

        protected Notes m_Notes
        the notes for the chromatogram.
    • Constructor Detail

      • Instance

        public Instance()
        Initializes the sequence.
    • Method Detail

      • newReport

        protected Report newReport()
        Creates an empty report.
        Returns:
        the empty report
      • hasDatasetHeader

        public boolean hasDatasetHeader()
        Returns whether a header of a dataset is available.
        Returns:
        true if a header is available
      • getDatasetHeader

        public weka.core.Instances getDatasetHeader()
        Returns the header of the underlying dataset.
        Returns:
        the header, null if none currently set
      • set

        public void set​(weka.core.Instance inst)
        Clears the container and adds the data from the weka.core.Instance (internal values).
        Parameters:
        inst - the instance to use
      • set

        public void set​(weka.core.Instance inst,
                        int index,
                        int[] additional,
                        Range range,
                        HashSet<Integer> attTypes)
        Clears the container and adds the data from the weka.core.Instance (internal values). Uses only the attributes specified in the range.
        Parameters:
        inst - the instance to use
        index - the row index in the original dataset, use -1 to ignore
        additional - the indices of the additional attribute values to store in the report
        range - the range of attributes to limit the instance to
        attTypes - whether to restrict to attributes types, null or zero-length array means no restriction
        See Also:
        Attribute
      • hasReport

        public boolean hasReport()
        Checks whether a report is present.
        Specified by:
        hasReport in interface ReportHandler<Report>
        Returns:
        always true
      • getReport

        public Report getReport()
        Returns the report.
        Specified by:
        getReport in interface ReportHandler<Report>
        Returns:
        the report, can be null if none available
      • toDoubleArray

        public double[] toDoubleArray()
        Returns the y values as double array.
        Returns:
        the y values
      • toInstance

        public weka.core.Instance toInstance()
        Generates a weka instance, if a dataset header is available.
        Returns:
        the generated Instance, null if no header available
      • getNotes

        public Notes getNotes()
        Returns the currently stored notes.
        Specified by:
        getNotes in interface NotesHandler
        Returns:
        the current notes