Module swim.math
Package swim.math

Class TensorArrayForm<T,V>

java.lang.Object
swim.structure.Form<T>
swim.math.TensorForm<T>
swim.math.TensorArrayForm<T,V>

public abstract class TensorArrayForm<T,V> extends TensorForm<T>
  • Constructor Details

    • TensorArrayForm

      public TensorArrayForm()
  • Method Details

    • next

      public abstract TensorForm<V> next()
    • fromArray

      public abstract T fromArray(Object... array)
    • toArray

      public abstract Object[] toArray(T tensor)
    • newArray

      protected Object[] newArray(int length)
    • tag

      public String tag()
      Description copied from class: Form
      Returns the key of the tag attribute that distinguishes structures of this Form; returns null if this Form has no distinguishing tag attribute. Used to accelerate distrcrimination of polymorphic structural types with nominal type hints.
      Overrides:
      tag in class Form<T>
    • mold

      public Item mold(T tensor)
      Description copied from class: Form
      Converts a nominally typed Java object into its structurally typed equivalent. The returned Item must never be null.
      Specified by:
      mold in class Form<T>
    • cast

      public T cast(Item item)
      Description copied from class: Form
      Converts a structurally typed item into a nominally typed Java object. The passed-in item is assumed to be non-null.
      Specified by:
      cast in class Form<T>
    • fromTensor

      public T fromTensor(TensorDims vd, float[] vs, int vi)
      Specified by:
      fromTensor in class TensorForm<T>
    • fromTensor

      public T fromTensor(TensorDims vd, double[] vs, int vi)
      Specified by:
      fromTensor in class TensorForm<T>
    • toTensor

      public void toTensor(T u, TensorDims vd, float[] vs, int vi)
      Specified by:
      toTensor in class TensorForm<T>
    • toTensor

      public void toTensor(T u, TensorDims vd, double[] vs, int vi)
      Specified by:
      toTensor in class TensorForm<T>
    • moldTensor

      public Item moldTensor(TensorDims vd, float[] vs, int vi)
      Overrides:
      moldTensor in class TensorForm<T>
    • moldTensor

      public Item moldTensor(TensorDims vd, double[] vs, int vi)
      Overrides:
      moldTensor in class TensorForm<T>
    • castTensor

      public void castTensor(Item item, TensorDims vd, float[] vs, int vi)
      Overrides:
      castTensor in class TensorForm<T>
    • castTensor

      public void castTensor(Item item, TensorDims vd, double[] vs, int vi)
      Overrides:
      castTensor in class TensorForm<T>
    • create

      public static <V> TensorArrayForm<V[],V> create(TensorForm<V> next)