Class ShortTable
java.lang.Object
org.variantsync.diffdetective.tablegen.TableDefinition
org.variantsync.diffdetective.tablegen.styles.ShortTable
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 Summary
Fields inherited from class org.variantsync.diffdetective.tablegen.TableDefinition
columnDefinitions, doubleFormat, intFormat
-
Constructor Summary
ModifierConstructorDescriptionprivate
ShortTable
(boolean filtered) Constructs a table template which shortens the table by filtering the rows ifffiltered
istrue
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShortTable
Absolute
(boolean filtered) Constructs a table template with absolute edit class counts.private static String
absoluteCountOf
(ShortTable t, EditClass editClass, ContentRow row) Returns a formatted string of the absolute number of occurrences ofeditClass
inrow
.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.static ShortTable
Relative
(boolean filtered) Constructs a table template with relative edit class counts.private static String
relativeCountOf
(ShortTable t, EditClass editClass, ContentRow row) Returns a formatted string of the relative number of occurrences ofeditClass
inrow
.sortAndFilter
(List<ContentRow> rows, ContentRow ultimateResult) Conditionally sorts and limits the rows by the number of commits in their dataset.Methods inherited from class org.variantsync.diffdetective.tablegen.TableDefinition
col, columnDefinitions, makeReadable, makeReadable, makeReadable, makeReadable, makeReadable
-
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 ifffiltered
istrue
.
-
-
Method Details
-
Absolute
Constructs a table template with absolute edit class counts.- Parameters:
filtered
- iftrue
, the rows will be filtered to only contain the biggest datasets
-
Relative
Constructs a table template with relative edit class counts.- Parameters:
filtered
- iftrue
, 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 withTableDefinition.makeReadable(java.lang.Number)
getEditClassCount
- function to extract the edit class count of a row
-
absoluteCountOf
Returns a formatted string of the absolute number of occurrences ofeditClass
inrow
. The signature of this method is suitable to be passed tocolumns(ShortTable, TriFunction)
.- Parameters:
t
- an instance of this class contained in the column definitioneditClass
- the edit class to countrow
- the data to counteditClass
in- See Also:
-
relativeCountOf
Returns a formatted string of the relative number of occurrences ofeditClass
inrow
. The signature of this method is suitable to be passed tocolumns(ShortTable, TriFunction)
.- Parameters:
t
- an instance of this class contained in the column definitioneditClass
- the edit class to countrow
- the data to counteditClass
in- See Also:
-
sortAndFilter
Conditionally sorts and limits the rows by the number of commits in their dataset.- Specified by:
sortAndFilter
in classTableDefinition
- Parameters:
rows
- the data to be sorted and filteredultimateResult
- a row containing accumulated results ofrows
- See Also:
-