Class Computer

java.lang.Object
io.deephaven.integrations.learn.Computer

public class Computer extends Object
Computer creates a new deferred calculation plus an offset (FutureOffset) every time computer is called.
  • Constructor Details

    • Computer

      public Computer(Table table, org.jpy.PyObject modelFunc, Input[] inputs, int batchSize)
      Creates a new Computer.
      Parameters:
      modelFunc - python function to call on the given inputs from a table.
      inputs - inputs to the model function.
      batchSize - maximum number of rows for each deferred computation.
    • Computer

      public Computer(Table table, Function<Object[],Object> modelFunc, Input[] inputs, int batchSize)
      Creates a new Computer.
      Parameters:
      modelFunc - python function to call on the given inputs from a table.
      inputs - inputs to the model function.
      batchSize - maximum number of rows for each deferred computation.
  • Method Details

    • clear

      public boolean clear()
      Resets the current future after each set of calculations.
      Returns:
      always false, because functions used in query strings cannot return nothing.
    • compute

      public FutureOffset compute(long k)
      Adds new row indices to be used in the deferred calculation.
      Parameters:
      k - index to be added to the current index set.
      Returns:
      future offset that combines a future with the relevant row index to access result.