public class Vector.Slice extends Vector
Vector.Derived, Vector.Doubles, Vector.GP, Vector.Ints, Vector.Slice, Vector.Strings, Vector.Weighted
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
Modifier and Type | Field and Description |
---|---|
int |
hi
The range [lo, hi), lo inclusive to hi exclusive, of
the
parent() 's elements. |
int |
lo
The range [lo, hi), lo inclusive to hi exclusive, of
the
parent() 's elements. |
Constructor and Description |
---|
Slice(int lo,
int hi)
Note, [lo, hi), lo inclusive to hi exclusive.
|
Modifier and Type | Method and Description |
---|---|
Vector |
addMore(Vector p,
int loP,
int hiP)
Return 'this' Slice with elements p.[loP,hiP) prepended or
appended as appropriate; it requires (and checks) that
parent() . |
Vector |
append(Vector v2)
'this' appended to v2 but be efficient if they have
the same
parent and abut. |
double |
constAoM()
By default, return −1 (any negative) indicating the elements' AoMs
(if appropriate) may vary from element to element.
|
double |
constWt()
By default, return 1.0 indicating that every element has that
weight . |
Vector |
delete(Vector p,
int loP,
int hiP)
Return 'this' Slice with elements p.[loP,hiP) deleted; it requires
(and checks) that
parent() . |
Value |
elt(int i)
|
Type |
eltType()
The type of all(!) elements of 'this' Vector.
|
int |
nElts()
|
Vector |
parent()
The Vector of which 'this' Slice is a Slice.
|
Vector |
slice(int lo2,
int hi2)
|
Type |
type()
|
double |
wt(int i)
|
addMore, AoM, append, as_1xn, as_nx1, asDiagonal, asMatrix, asQ, asQrotn, bOp, closes, col, cols, combine, compareTo, constNlAoM, csv, csv, delete, dot, doubles, doubles, doubles, drop, drop, dropLast, elt, elts, foldl, foldl, foldr, foldr, fromScannable, ints, ints, isRectangular, isSquare, main, map, match, merge, n, nCols, nearlySymmetric, nearlySymmetric, nElts, nlAoM, nlAoM, nlAoM, norm_Cts, norm, normalised, normalised1, normalised2, opens, repeat, rotate, rotate, rowLength, scaled, shape, singleton, sorted, sorted, sorted, strings, sumSq, take, takeLast, times, toSeries, uniqueElts, unzip, unzip, uOp, values, weight, weight, weight, weightLike, weightLike, wtMedian, wtNlAoM, wtNlAoM, wts, wts, x, zip, zip
AoM, elts, frth, fst, print, separator, snd, thrd, toString
public final int lo
parent()
's elements.
public final int hi
parent()
's elements.
public Vector parent()
public Type eltType()
Vector
public double constWt()
Vector
weight
. Return a negative to indicate that weights may
vary. Used by wts()
, wtNlAoM()
, etc..
(Also see constAoM()
.)public double constAoM()
Vector
nlAoM()
and wtNlAoM()
.
Also see constNlAoM()
and
constWt()
.public Vector append(Vector v2)
parent
and abut.