java.lang.Object
swim.structure.Form<T>
swim.math.TensorForm<T>
swim.math.TensorArrayForm<T,V>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts a structurally typeditem
into a nominally typed Java object.void
castTensor
(Item item, TensorDims vd, double[] vs, int vi) void
castTensor
(Item item, TensorDims vd, float[] vs, int vi) static <V> TensorArrayForm<V[],
V> create
(TensorForm<V> next) abstract T
fromTensor
(TensorDims vd, double[] vs, int vi) fromTensor
(TensorDims vd, float[] vs, int vi) Converts a nominally typed Javaobject
into its structurally typed equivalent.moldTensor
(TensorDims vd, double[] vs, int vi) moldTensor
(TensorDims vd, float[] vs, int vi) protected Object[]
newArray
(int length) abstract TensorForm<V>
next()
tag()
Returns the key of the tag attribute that distinguishes structures of thisForm
; returnsnull
if thisForm
has no distinguishing tag attribute.abstract Object[]
void
toTensor
(T u, TensorDims vd, double[] vs, int vi) void
toTensor
(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
-
Constructor Details
-
TensorArrayForm
public TensorArrayForm()
-
-
Method Details
-
next
-
fromArray
-
toArray
-
newArray
-
tag
Description copied from class:Form
Returns the key of the tag attribute that distinguishes structures of thisForm
; returnsnull
if thisForm
has no distinguishing tag attribute. Used to accelerate distrcrimination of polymorphic structural types with nominal type hints. -
mold
Description copied from class:Form
Converts a nominally typed Javaobject
into its structurally typed equivalent. The returnedItem
must never benull
. -
cast
Description copied from class:Form
Converts a structurally typeditem
into a nominally typed Java object. The passed-initem
is assumed to be non-null
. -
fromTensor
- Specified by:
fromTensor
in classTensorForm<T>
-
fromTensor
- Specified by:
fromTensor
in classTensorForm<T>
-
toTensor
- Specified by:
toTensor
in classTensorForm<T>
-
toTensor
- Specified by:
toTensor
in classTensorForm<T>
-
moldTensor
- Overrides:
moldTensor
in classTensorForm<T>
-
moldTensor
- Overrides:
moldTensor
in classTensorForm<T>
-
castTensor
- Overrides:
castTensor
in classTensorForm<T>
-
castTensor
- Overrides:
castTensor
in classTensorForm<T>
-
create
-