Module swim.math
Package swim.math

Class TensorArrayForm<T,​V>


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

      • TensorArrayForm

        public TensorArrayForm()
    • Method Detail

      • 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>