java.lang.Object
org.variantsync.diffdetective.tablegen.TableDefinition
org.variantsync.diffdetective.tablegen.styles.ShortTable

public class ShortTable extends TableDefinition
A template of a LaTex table containing a row with much information for each dataset. The table can be shortened by filtering the rows to only keep the biggest datasets.

Each row represents one dataset and contains the following data:

  • a dataset description
  • commit counts
  • diff counts
  • the number of artifact nodes
  • edit class counts, either absolute or relative to the total count of all edit classes
  • processing time
  • Field Details

    • filtered

      private final boolean filtered
  • Constructor Details

    • ShortTable

      private ShortTable(boolean filtered)
      Constructs a table template which shortens the table by filtering the rows iff filtered is true.
  • Method Details

    • Absolute

      public static ShortTable Absolute(boolean filtered)
      Constructs a table template with absolute edit class counts.
      Parameters:
      filtered - if true, the rows will be filtered to only contain the biggest datasets
    • Relative

      public static ShortTable Relative(boolean filtered)
      Constructs a table template with relative edit class counts.
      Parameters:
      filtered - if true, the rows will be filtered to only contain the biggest datasets
    • columns

      private static List<ColumnDefinition> columns(ShortTable t, org.apache.commons.lang3.function.TriFunction<ShortTable,EditClass,ContentRow,String> getEditClassCount)
      Returns a list of all columns contained in this table.
      Parameters:
      t - instance to this class, used for formatting with TableDefinition.makeReadable(java.lang.Number)
      getEditClassCount - function to extract the edit class count of a row
    • absoluteCountOf

      private static String absoluteCountOf(ShortTable t, EditClass editClass, ContentRow row)
      Returns a formatted string of the absolute number of occurrences of editClass in row. The signature of this method is suitable to be passed to columns(ShortTable, TriFunction).
      Parameters:
      t - an instance of this class contained in the column definition
      editClass - the edit class to count
      row - the data to count editClass in
      See Also:
    • relativeCountOf

      private static String relativeCountOf(ShortTable t, EditClass editClass, ContentRow row)
      Returns a formatted string of the relative number of occurrences of editClass in row. The signature of this method is suitable to be passed to columns(ShortTable, TriFunction).
      Parameters:
      t - an instance of this class contained in the column definition
      editClass - the edit class to count
      row - the data to count editClass in
      See Also:
    • sortAndFilter

      public List<? extends Row> sortAndFilter(List<ContentRow> rows, ContentRow ultimateResult)
      Conditionally sorts and limits the rows by the number of commits in their dataset.
      Specified by:
      sortAndFilter in class TableDefinition
      Parameters:
      rows - the data to be sorted and filtered
      ultimateResult - a row containing accumulated results of rows
      See Also: