Interface ColumnCalculator<S>

  • All Known Implementing Classes:
    MultiServiceColumnCalculator, SchlegelCalculator

    public interface ColumnCalculator<S>
    Defines an object which can calculate new columns for a table given a fixed set of input columns and some additional configuration.

    This interface is suitable for algorithms which do not simply operate row-by-row, that is they may need some or all rows of an input table in order to generate the output table. In typical usage it may take a significant amount of time to complete; it will not normally be appropriate to invoke the same calculation on the same table more than once (for instance, to generate virtual data for table cells).

    Since:
    14 Oct 2011
    Author:
    Mark Taylor
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void calculateColumns​(S spec, uk.ac.starlink.table.StarTable tupleTable, uk.ac.starlink.table.TableSink sink)
      Performs the calculation.
      uk.ac.starlink.table.ValueInfo[] getTupleInfos()
      Returns an array describing the columns of the input table.
    • Method Detail

      • getTupleInfos

        uk.ac.starlink.table.ValueInfo[] getTupleInfos()
        Returns an array describing the columns of the input table.
        Returns:
        one info for each column in the tuple table
      • calculateColumns

        void calculateColumns​(S spec,
                              uk.ac.starlink.table.StarTable tupleTable,
                              uk.ac.starlink.table.TableSink sink)
                       throws java.io.IOException
        Performs the calculation. Rows are written to the output sink based on the input table and configuration contained in the spec object. The output table must have the same number of rows as the input table, and will not normally contain any of the same columns.
        Parameters:
        spec - specification object providing additional instructions about the calculation to be performed
        tupleTable - input table, with one column for each tuple element
        sink - sink to which the output table is written
        Throws:
        java.io.IOException