Tensorics - Multidimensional Java with Pleasure!

Tensorics is a java framework for data processing of multidimensional data. The core object is called a Tensor which represents a collection of values of arbitrary types, which are addressed by coordinates in an N-dimensional space (in some sense like a map with composite keys).

import org.tensorics.core.lang.Tensorics.*;

Tensor<Double> degrees = builder(City.class, Day.class)
  .put(at(SAN_FRANCISCO, YESTERDAY), 11.5)
  .put(at(SAN_FRANCISCO, TODAY), 12.5)
  .put(at(NEW_YORK, YESTERDAY), 2.5)
  .put(at(NEW_YORK, TODAY), 3.5)
  .build();

Double todayInNewYork = degrees.get(NEW_YORK, TODAY); // 3.5

Whenever you are looking for one or more of the following features, tensorics might come in handy:

  • multi-dimensional arrays.

  • composite-key maps.

  • mathematical operations over multidimensional data.