use of tech.tablesaw.api.DoubleColumn in project symja_android_library by axkr.
the class Stats method asTableComplete.
public Table asTableComplete() {
Table t = asTable();
StringColumn measure = t.stringColumn("Measure");
DoubleColumn value = t.doubleColumn("Value");
measure.append("Sum of Squares");
value.append(sumOfSquares());
measure.append("Sum of Logs");
value.append(sumOfLogs());
measure.append("Population Variance");
value.append(populationVariance());
measure.append("Geometric Mean");
value.append(geometricMean());
measure.append("Quadratic Mean");
value.append(quadraticMean());
measure.append("Second Moment");
value.append(secondMoment());
return t;
}
use of tech.tablesaw.api.DoubleColumn in project symja_android_library by axkr.
the class NumberMapFunctions method add.
default DoubleColumn add(NumericColumn<?> column2) {
int col1Size = size();
int col2Size = column2.size();
if (col1Size != col2Size)
throw new IllegalArgumentException("The columns must have the same number of elements");
DoubleColumn result = DoubleColumn.create(name() + " + " + column2.name(), col1Size);
for (int r = 0; r < col1Size; r++) {
result.set(r, add(getDouble(r), column2.getDouble(r)));
}
return result;
}
use of tech.tablesaw.api.DoubleColumn in project symja_android_library by axkr.
the class NumberMapFunctions method add.
default DoubleColumn add(Number value) {
double val = value.doubleValue();
DoubleColumn result = DoubleColumn.create(name() + " + " + val, size());
for (int i = 0; i < size(); i++) {
result.set(i, add(getDouble(i), val));
}
return result;
}
use of tech.tablesaw.api.DoubleColumn in project symja_android_library by axkr.
the class NumberMapFunctions method divide.
default DoubleColumn divide(Number value) {
double val = value.doubleValue();
DoubleColumn result = DoubleColumn.create(name() + " / " + val, size());
for (int i = 0; i < size(); i++) {
result.set(i, divide(getDouble(i), val));
}
return result;
}
use of tech.tablesaw.api.DoubleColumn in project symja_android_library by axkr.
the class NumberMapFunctions method multiply.
default DoubleColumn multiply(NumericColumn<?> column2) {
int col1Size = size();
int col2Size = column2.size();
if (col1Size != col2Size)
throw new IllegalArgumentException("The columns must have the same number of elements");
DoubleColumn result = DoubleColumn.create(name() + " * " + column2.name(), col1Size);
for (int r = 0; r < col1Size; r++) {
result.set(r, multiply(getDouble(r), column2.getDouble(r)));
}
return result;
}
Aggregations