use of org.tensorics.core.examples.meteo.domain.Temperature in project tensorics-core by tensorics.
the class WeatherHistoryInEurope method calculate.
// tag::import[]
/*
* calculate an average monthly temperature at the ROME Latitude like cities
*/
@SuppressWarnings("unused")
public void calculate() {
Tensor<QuantifiedValue<Double>> importedData = importDataForCities();
Latitude romeLatitude = EuropeanCapital.ROMA.getLatitude();
Tensor<QuantifiedValue<Double>> sliceAtTropicCancerAndRome = from(importedData).extract(romeLatitude);
Temperature temperature = new Temperature(importedData);
Tensor<QuantifiedValue<Double>> elementTimes = calculateQ(importedData).elementTimes(importedData);
Temperature elementTimes2 = calculateQ(temperature).elementTimes(temperature);
/* dimension will be reduced to only Longitude and Time */
sliceAtTropicCancerAndRome.shape().dimensionSet();
//
// from(sliceAtTropicCancerAndRome).reduce(Time.class).byAveragingIn(field)
TensoricSupport<Double> fullTensoricSupport = Tensorics.using(Structures.doubles());
}
Aggregations