Class VariabilityShare
java.lang.Object
org.variantsync.diffdetective.tablegen.TableDefinition
org.variantsync.diffdetective.tablegen.styles.VariabilityShare
A template of a LaTex table containing the share of variability changing edits for each dataset.
Each row represents one dataset and contains the following data:
- the name of the dataset
- the total number of edits to variability
- a relative occurrence count for each edit class changing variability
-
Field Summary
Fields inherited from class org.variantsync.diffdetective.tablegen.TableDefinition
columnDefinitions, doubleFormat, intFormat
-
Constructor Summary
ConstructorDescriptionVariabilityShare
(Supplier<TableDefinition> inner) Constructs a table definition usinginner
to sort and filter the rows. -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
Compute the total sum of all occurrences of edit classes present in this table.private String
getRelativeShareOf
(EditClass editClass, ContentRow row) Compute the number of occurrences ofeditClass
relative to the edit classes actually present in this table.private static Stream<Map.Entry<EditClass,
EditClassCount.Occurrences>> Returns the number of occurrences of edit classes present in the table.private static boolean
Returns if the edit classc
should be present in this table.sortAndFilter
(List<ContentRow> rows, ContentRow ultimateResult) Delegates toinner
given in theconstructor
.Methods inherited from class org.variantsync.diffdetective.tablegen.TableDefinition
col, columnDefinitions, makeReadable, makeReadable, makeReadable, makeReadable, makeReadable
-
Field Details
-
inner
-
-
Constructor Details
-
VariabilityShare
Constructs a table definition usinginner
to sort and filter the rows.
-
-
Method Details
-
isEditToVariability
Returns if the edit classc
should be present in this table. -
getVariationalEditClasses
private static Stream<Map.Entry<EditClass,EditClassCount.Occurrences>> getVariationalEditClasses(ContentRow row) Returns the number of occurrences of edit classes present in the table. -
countEditsToVariability
Compute the total sum of all occurrences of edit classes present in this table. -
sortAndFilter
Delegates toinner
given in theconstructor
.- Specified by:
sortAndFilter
in classTableDefinition
- Parameters:
rows
- the data to be sorted and filteredultimateResult
- a row containing accumulated results ofrows
-