public class SliceND extends Object
Constructor and Description |
---|
SliceND(int[] shape)
Construct ND slice for whole of shape
|
SliceND(int[] shape,
int[] start,
int[] stop,
int[] step)
Construct ND slice parameters
|
SliceND(int[] shape,
int[] maxShape,
int[] start,
int[] stop,
int[] step)
Construct ND slice parameters
|
SliceND(int[] shape,
int[] maxShape,
Slice... slice)
Construct ND slice from an array of 1D slices
|
SliceND(int[] shape,
Slice... slice)
Construct ND slice from an array of 1D slices
|
Modifier and Type | Method and Description |
---|---|
SliceND |
clone() |
Slice[] |
convertToSlice()
Convert to a slice array
|
static SliceND |
createSlice(ILazyDataset data,
int[] start,
int[] stop)
Creating slice from dataset
|
static SliceND |
createSlice(ILazyDataset data,
int[] start,
int[] stop,
int[] step)
Creating slice from dataset
|
SliceND |
flip()
Flip slice direction in all dimensions so slice begins at previous end point,
steps in the opposite direction, and finishes at the previous start point
|
SliceND |
flip(int i)
Flip slice direction in given dimension so slice begins at previous end point,
steps in the opposite direction, and finishes at the previous start point
|
int[] |
getMaxShape() |
int[] |
getShape() |
int[] |
getSourceShape() |
int[] |
getStart() |
int[] |
getStep() |
int[] |
getStop()
Note stop values are clamped to -1 for negative steps
|
boolean |
isAll() |
boolean |
isExpanded() |
void |
setSlice(int i,
Integer start,
Integer stop,
int step)
Set slice for given dimension
|
void |
setSlice(int i,
int start,
int stop,
int step)
Set slice for given dimension
|
void |
setSlice(int i,
Slice slice)
Set slice for given dimension
|
String |
toString() |
public SliceND(int[] shape)
shape
- public SliceND(int[] shape, Slice... slice)
shape
- slice
- public SliceND(int[] shape, int[] maxShape, Slice... slice)
shape
- maxShape
- can be nullslice
- public SliceND(int[] shape, int[] start, int[] stop, int[] step)
shape
- start
- can be nullstop
- can be nullstep
- can be nullpublic SliceND(int[] shape, int[] maxShape, int[] start, int[] stop, int[] step)
shape
- maxShape
- can be nullstart
- can be nullstop
- can be nullstep
- can be nullpublic void setSlice(int i, Integer start, Integer stop, int step)
i
- dimensionstart
- can be null to imply start of dimensionstop
- can be null to imply end of dimensionstep
- public void setSlice(int i, int start, int stop, int step)
i
- dimensionstart
- stop
- step
- public void setSlice(int i, Slice slice)
i
- dimensionslice
- public int[] getSourceShape()
public int[] getMaxShape()
public boolean isExpanded()
public int[] getShape()
public int[] getStart()
public int[] getStop()
public int[] getStep()
public boolean isAll()
public SliceND flip(int i)
i
- dimension to flippublic SliceND flip()
public Slice[] convertToSlice()
public static SliceND createSlice(ILazyDataset data, int[] start, int[] stop)
data
- start
- stop
- public static SliceND createSlice(ILazyDataset data, int[] start, int[] stop, int[] step)
data
- start
- stop
- step
- Copyright © 2017. All rights reserved.