Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java58
1 files changed, 29 insertions, 29 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java b/systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java
index 18c56ce017..62f53b084e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphing.core/src/org/eclipse/linuxtools/systemtap/graphing/core/aggregates/AverageAggregate.java
@@ -15,33 +15,33 @@ import org.eclipse.linuxtools.systemtap.graphing.core.structures.NumberType;
public class AverageAggregate implements IDataAggregate {
- /**
- * Ensure column isn't empty, then get the average of all the column's values.
- *
- * @param column The column to average.
- *
- * @return Average of all the column's values.
- */
- @Override
- public Number aggregate(Number[] column) {
- if(column == null || column.length == 0) {
- return null;
- }
-
- double num = 0;
-
- for(int i=0; i<column.length; i++) {
- num += column[i].doubleValue();
- }
-
- num /= column.length;
- return NumberType.getNumber(column[0], num);
- }
-
- @Override
- public String getID() {
- return ID;
- }
-
- public static final String ID = "org.eclipse.linuxtools.systemtap.graphing.core.aggregates.AverageAggregate"; //$NON-NLS-1$
+ /**
+ * Ensure column isn't empty, then get the average of all the column's values.
+ *
+ * @param column The column to average.
+ *
+ * @return Average of all the column's values.
+ */
+ @Override
+ public Number aggregate(Number[] column) {
+ if(column == null || column.length == 0) {
+ return null;
+ }
+
+ double num = 0;
+
+ for(int i=0; i<column.length; i++) {
+ num += column[i].doubleValue();
+ }
+
+ num /= column.length;
+ return NumberType.getNumber(column[0], num);
+ }
+
+ @Override
+ public String getID() {
+ return ID;
+ }
+
+ public static final String ID = "org.eclipse.linuxtools.systemtap.graphing.core.aggregates.AverageAggregate"; //$NON-NLS-1$
}

Back to the top