- 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 Summary
Constructors Constructor Description TensorArrayForm()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tcast(Item item)Converts a structurally typediteminto a nominally typed Java object.voidcastTensor(Item item, TensorDims vd, double[] vs, int vi)voidcastTensor(Item item, TensorDims vd, float[] vs, int vi)static <V> TensorArrayForm<V[],V>create(TensorForm<V> next)abstract TfromArray(Object... array)TfromTensor(TensorDims vd, double[] vs, int vi)TfromTensor(TensorDims vd, float[] vs, int vi)Itemmold(T tensor)Converts a nominally typed Javaobjectinto its structurally typed equivalent.ItemmoldTensor(TensorDims vd, double[] vs, int vi)ItemmoldTensor(TensorDims vd, float[] vs, int vi)protected Object[]newArray(int length)abstract TensorForm<V>next()Stringtag()Returns the key of the tag attribute that distinguishes structures of thisForm; returnsnullif thisFormhas no distinguishing tag attribute.abstract Object[]toArray(T tensor)voidtoTensor(T u, TensorDims vd, double[] vs, int vi)voidtoTensor(T u, TensorDims vd, float[] vs, int vi)-
Methods inherited from class swim.structure.Form
cast, forArray, forBigInteger, forBoolean, forBuiltin, forByte, forByteBuffer, forCharacter, forClass, forClass, forCollection, forDouble, forFloat, forInteger, forItem, forList, forLong, forMap, forMap, forNumber, forSet, forShort, forString, forValue, isBuiltin, mold, tag, type, unit, unit
-
-
-
-
Method Detail
-
next
public abstract TensorForm<V> next()
-
newArray
protected Object[] newArray(int length)
-
tag
public String tag()
Description copied from class:FormReturns the key of the tag attribute that distinguishes structures of thisForm; returnsnullif thisFormhas no distinguishing tag attribute. Used to accelerate distrcrimination of polymorphic structural types with nominal type hints.
-
mold
public Item mold(T tensor)
Description copied from class:FormConverts a nominally typed Javaobjectinto its structurally typed equivalent. The returnedItemmust never benull.
-
cast
public T cast(Item item)
Description copied from class:FormConverts a structurally typediteminto a nominally typed Java object. The passed-initemis assumed to be non-null.
-
fromTensor
public T fromTensor(TensorDims vd, float[] vs, int vi)
- Specified by:
fromTensorin classTensorForm<T>
-
fromTensor
public T fromTensor(TensorDims vd, double[] vs, int vi)
- Specified by:
fromTensorin classTensorForm<T>
-
toTensor
public void toTensor(T u, TensorDims vd, float[] vs, int vi)
- Specified by:
toTensorin classTensorForm<T>
-
toTensor
public void toTensor(T u, TensorDims vd, double[] vs, int vi)
- Specified by:
toTensorin classTensorForm<T>
-
moldTensor
public Item moldTensor(TensorDims vd, float[] vs, int vi)
- Overrides:
moldTensorin classTensorForm<T>
-
moldTensor
public Item moldTensor(TensorDims vd, double[] vs, int vi)
- Overrides:
moldTensorin classTensorForm<T>
-
castTensor
public void castTensor(Item item, TensorDims vd, float[] vs, int vi)
- Overrides:
castTensorin classTensorForm<T>
-
castTensor
public void castTensor(Item item, TensorDims vd, double[] vs, int vi)
- Overrides:
castTensorin classTensorForm<T>
-
create
public static <V> TensorArrayForm<V[],V> create(TensorForm<V> next)
-
-