public abstract static class Value.Tuple extends Value.Structured
Type.Tuple
and Vector
.Modifier and Type | Class and Description |
---|---|
static class |
Value.Tuple.GP
A simple general purpose (GP) implementation of a Tuple Value.
|
Value.Atomic, Value.Bool, Value.Char, Value.Chars, Value.Cts, Value.Defer, Value.Discrete, Value.Enum, Value.Inc_Or, Value.Int, Value.Lambda, Value.List, Value.Maybe, Value.Option, Value.Real, Value.Scannable, Value.Structured, Value.Triv, Value.Tuple
Constructor and Description |
---|
Tuple() |
Modifier and Type | Method and Description |
---|---|
Value.Tuple |
bOp(int op,
Value rgt)
Apply binary operator, 'op', element-wise to Tuples 'this'
and 'rgt'.
|
int |
compareTo(Value rgt)
Is 'this' Tuple < (-1), > (+1), or equal (0) to 'rgt'?
Note, 'this' and rgt must have the same shape.
|
abstract Value |
elt(int i)
Returns the i-th elt (
forced ). |
Value.Tuple |
elts(int[] ps)
Return a sub-Tuple of 'this', made of just the
elements at the selected positions, 'ps'.
|
int |
n()
For a Tuple consisting entirely of bounded Discrete Values,
return the obvious integer encoding, hoping it doesn't overflow.
|
abstract int |
nElts()
The number of elements (components, fields) in
'this' Structured Value.
|
abstract Type.Tuple |
type()
Return the
Type of 'this' Value. |
Value.Tuple |
uOp(int op)
Apply unary operator, 'op', element-wise to 'this' Tuple.
|
Vector |
zip()
From 'this' Tuple of Vectors (which is checked), return a
zipped Vector of Tuples. |
AoM, closes, elts, frth, fst, nlAoM, opens, print, separator, snd, thrd, toString
public abstract Type.Tuple type()
Value
Type
of 'this' Value.public int n()
public abstract int nElts()
Value.Structured
nElts
in class Value.Structured
public Value.Tuple elts(int[] ps)
public abstract Value elt(int i)
forced
).elt
in class Value.Structured
public Value.Tuple uOp(int op)
Lexical
for op codes.public Value.Tuple bOp(int op, Value rgt)
Lexical
for op codes.public int compareTo(Value rgt)