public abstract class BooleanIterator extends IndexIterator
IndexIterator.hasNext()
returns true. An optional third dataset can specify the output.
For speed, there are public members.Modifier and Type | Field and Description |
---|---|
protected Dataset |
aDataset |
protected int |
aMax |
protected int |
aStart |
protected int |
aStep |
protected Dataset |
cDataset |
int |
cIndex
Index in choice dataset
|
protected int[] |
maxShape |
protected Dataset |
oDataset
Output dataset
|
int |
oIndex
Index in output dataset
|
protected int |
oStart |
protected int |
oStep |
protected boolean |
outputA |
protected boolean |
value |
index
Modifier | Constructor and Description |
---|---|
protected |
BooleanIterator(boolean v,
Dataset a,
Dataset c,
Dataset o)
Construct a boolean iterator that stops at the given boolean value in choice dataset
|
Modifier and Type | Method and Description |
---|---|
static BooleanIterator |
createIterator(boolean v,
Dataset a,
Dataset c,
Dataset o)
Create a boolean iterator that stops at every position in the choice dataset where its value matches
the given boolean
|
static BooleanIterator |
createIterator(boolean v,
Dataset a,
Dataset c,
Dataset o,
boolean createIfNull)
Create a boolean iterator that stops at every position in the choice dataset where its value matches
the given boolean
|
static BooleanIterator |
createIterator(Dataset a,
Dataset c)
Create a boolean iterator that stops at every position in the choice dataset with a true value
|
static BooleanIterator |
createIterator(Dataset a,
Dataset c,
Dataset o)
Create a boolean iterator that stops at every position in the choice dataset with a true value
|
Dataset |
getChoice() |
Dataset |
getOutput() |
int[] |
getShape() |
getPos, hasNext, reset
protected final boolean value
public int cIndex
public int oIndex
protected final boolean outputA
protected int[] maxShape
protected final int aStep
protected int oStep
protected int aMax
protected int aStart
protected int oStart
protected BooleanIterator(boolean v, Dataset a, Dataset c, Dataset o)
v
- boolean valuea
- primary datasetc
- choice dataseto
- output dataset, can be nullpublic static BooleanIterator createIterator(Dataset a, Dataset c)
a
- primary datasetc
- choice dataset, can be null to choose allpublic static BooleanIterator createIterator(Dataset a, Dataset c, Dataset o)
a
- primary datasetc
- choice dataset, can be null to choose allo
- output dataset, can be nullpublic static BooleanIterator createIterator(boolean v, Dataset a, Dataset c, Dataset o)
v
- boolean valuea
- primary datasetc
- choice dataset, can be null to choose allo
- output dataset, can be nullpublic static BooleanIterator createIterator(boolean v, Dataset a, Dataset c, Dataset o, boolean createIfNull)
v
- boolean valuea
- primary datasetc
- choice dataset, can be null to choose allo
- output dataset, can be nullcreateIfNull
- if true create the output dataset if that is nullpublic int[] getShape()
getShape
in class IndexIterator
Copyright © 2014–2017 Eclipse Foundation. All rights reserved.