public class AttributeColumnsMergeStrategiesControllerImpl extends Object implements AttributeColumnsMergeStrategiesController
AttributeColumnsMergeStrategiesControllerAttributeColumnsMergeStrategiesController.BooleanOperations| Constructor and Description |
|---|
AttributeColumnsMergeStrategiesControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.gephi.graph.api.Column |
averageNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the average of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
org.gephi.graph.api.Column |
booleanLogicOperationsMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
AttributeColumnsMergeStrategiesController.BooleanOperations[] booleanOperations,
String newColumnTitle)
Strategy to apply only to all boolean columns.
|
private void |
checkColumnsAreNumberOrNumberList(org.gephi.graph.api.Column[] columns) |
private void |
checkTableAndColumnsAreNumberOrNumberList(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columns) |
private void |
checkTableAndOneColumn(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn) |
org.gephi.graph.api.Column |
firstQuartileNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the first quartile (Q1) of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
private org.gephi.graph.api.Column |
getTimeIntervalColumn(org.gephi.graph.api.Table table)
Private methods:
|
org.gephi.graph.api.Column |
interQuartileRangeNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the interquartile range (IQR) of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
org.gephi.graph.api.Column |
joinWithSeparatorMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
Class newColumnType,
String newColumnTitle,
String separator)
Joins various columns of any type into a new column using the given separator string (or null).
|
org.gephi.graph.api.Column |
maxValueNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the maximum value of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
org.gephi.graph.api.Column |
medianNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the median of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
org.gephi.graph.api.Column |
mergeDateColumnsToTimeInterval(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn,
SimpleDateFormat dateFormat,
String defaultStartDate,
String defaultEndDate)
Merge 1 or 2 columns creating a time interval for each row.
|
org.gephi.graph.api.Column |
mergeNumericColumnsToTimeInterval(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn,
double defaultStart,
double defaultEnd)
Merge 1 or 2 columns creating a time interval for each row.
|
org.gephi.graph.api.Column |
minValueNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the minimum value of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
private double |
parseDateToDouble(SimpleDateFormat dateFormat,
String date,
double defaultValue) |
private double |
parseDouble(String number,
double defaultValue) |
org.gephi.graph.api.Column |
sumNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the sum of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
org.gephi.graph.api.Column |
thirdQuartileNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
Merges any combination of number or number list columns, calculating the third quartile (Q3) of all not null values
and puts the result of each row in a new column of
BIGDECIMAL AttributeType. |
public AttributeColumnsMergeStrategiesControllerImpl()
public org.gephi.graph.api.Column joinWithSeparatorMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
Class newColumnType,
String newColumnTitle,
String separator)
AttributeColumnsMergeStrategiesControllerJoins various columns of any type into a new column using the given separator string (or null).
If the specified column type is null, the new created column will have STRING AttributeType by default.
joinWithSeparatorMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Columns to mergenewColumnType - Type for the new column. If null, STRING will be used by defaultnewColumnTitle - Title for the new columnseparator - Separator to put between each valuepublic org.gephi.graph.api.Column booleanLogicOperationsMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
AttributeColumnsMergeStrategiesController.BooleanOperations[] booleanOperations,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerStrategy to apply only to all boolean columns. Merges various columns into a new boolean column allowing to define each operation to apply between each pair of columns to merge.
The length of the operations array must be the length of the columns array-1, or IllegalArgumentException will be thrown.
booleanLogicOperationsMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Boolean columns to mergebooleanOperations - Boolean operations to applynewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column mergeNumericColumnsToTimeInterval(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn,
double defaultStart,
double defaultEnd)
AttributeColumnsMergeStrategiesControllerMerge 1 or 2 columns creating a time interval for each row. Values of the columns will be expected as numbers
Only one of the 2 column could be null, and its corresponding start/end default will be used.
Columns can be of any type. If not numeric, their values will be parsed.
Default start and end values will be used when the columns don't have a value or it can't be parsed to a double.
When start > end for any reason:
mergeNumericColumnsToTimeInterval in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns, can't be null or wrongstartColumn - Column to use as start valueendColumn - Column to use as end valuedefaultStart - Default start valuedefaultEnd - Default end valuepublic org.gephi.graph.api.Column mergeDateColumnsToTimeInterval(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn,
SimpleDateFormat dateFormat,
String defaultStartDate,
String defaultEndDate)
AttributeColumnsMergeStrategiesControllerMerge 1 or 2 columns creating a time interval for each row. Values of the columns will be expected as dates in the given date format
Only one of the 2 column could be null, and its corresponding start/end default will be used.
Columns can be of any type.
Default start and end values will be used when the columns don't have a value or it can't be parsed to a date. If a default value can't be parsed to a date, infinity will be used as default instead.
When start > end for any reason:
mergeDateColumnsToTimeInterval in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns, can't be null or wrongstartColumn - Column to use as start valueendColumn - Column to use as end valuedateFormat - Format for the dates, can't be nulldefaultStartDate - Default date to use as start if it can be parseddefaultEndDate - Default date to use as end if it can be parsedpublic org.gephi.graph.api.Column averageNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the average of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
averageNumberMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column firstQuartileNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the first quartile (Q1) of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
firstQuartileNumberMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column medianNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the median of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
medianNumberMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column thirdQuartileNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the third quartile (Q3) of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
thirdQuartileNumberMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column interQuartileRangeNumberMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the interquartile range (IQR) of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
interQuartileRangeNumberMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column sumNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the sum of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
sumNumbersMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column minValueNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerBIGDECIMAL AttributeType.minValueNumbersMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnpublic org.gephi.graph.api.Column maxValueNumbersMerge(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columnsToMerge,
String newColumnTitle)
AttributeColumnsMergeStrategiesControllerMerges any combination of number or number list columns, calculating the maximum value of all not null values
and puts the result of each row in a new column of BIGDECIMAL AttributeType.
maxValueNumbersMerge in interface AttributeColumnsMergeStrategiesControllertable - Table of the columns to mergecolumnsToMerge - Number or number list columnsnewColumnTitle - Title for the new columnprivate org.gephi.graph.api.Column getTimeIntervalColumn(org.gephi.graph.api.Table table)
private double parseDouble(String number, double defaultValue)
private double parseDateToDouble(SimpleDateFormat dateFormat, String date, double defaultValue)
private void checkTableAndOneColumn(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column startColumn,
org.gephi.graph.api.Column endColumn)
private void checkTableAndColumnsAreNumberOrNumberList(org.gephi.graph.api.Table table,
org.gephi.graph.api.Column[] columns)
private void checkColumnsAreNumberOrNumberList(org.gephi.graph.api.Column[] columns)
Copyright © 2007–2016 Gephi Consortium. All rights reserved.