public final class NodeBitMap extends Object implements NodeIterable<Node>
Modifier and Type | Class and Description |
---|---|
private static class |
NodeBitMap.MarkedNodeIterator |
Modifier and Type | Field and Description |
---|---|
private long[] |
bits |
private int |
counter |
private int |
nodeCount |
private NodeIdAccessor |
nodeIdAccessor |
private static int |
SHIFT |
Modifier | Constructor and Description |
---|---|
|
NodeBitMap(Graph graph) |
private |
NodeBitMap(NodeBitMap other) |
Modifier and Type | Method and Description |
---|---|
private boolean |
check(Node node,
boolean grow) |
boolean |
checkAndMarkInc(Node node) |
private void |
checkGrow(int id) |
void |
clear(Node node) |
void |
clearAll() |
void |
clearAndGrow(Node node) |
boolean |
contains(Node node) |
NodeBitMap |
copy() |
int |
count() |
NodeIterable<Node> |
distinct() |
int |
getCounter() |
Graph |
graph() |
void |
grow() |
void |
intersect(NodeBitMap other) |
boolean |
isMarked(int id) |
boolean |
isMarked(Node node) |
boolean |
isMarkedAndGrow(Node node) |
boolean |
isNew(Node node) |
Iterator<Node> |
iterator() |
void |
mark(Node node) |
<T extends Node> |
markAll(Iterable<T> nodes) |
void |
markAndGrow(Node node) |
private static int |
sizeForNodeCount(int nodeCount) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
filter, filter, filterInterface, first, isEmpty, isNotEmpty, nonNull, snapshot, snapshotTo
forEach, spliterator
private static final int SHIFT
private long[] bits
private int nodeCount
private final NodeIdAccessor nodeIdAccessor
private int counter
public NodeBitMap(Graph graph)
private NodeBitMap(NodeBitMap other)
private static int sizeForNodeCount(int nodeCount)
public int getCounter()
public boolean checkAndMarkInc(Node node)
public boolean isMarked(int id)
public boolean isMarkedAndGrow(Node node)
public void markAndGrow(Node node)
public void clearAndGrow(Node node)
private void checkGrow(int id)
public void clearAll()
public void intersect(NodeBitMap other)
public void grow()
public NodeBitMap copy()
public NodeIterable<Node> distinct()
distinct
in interface NodeIterable<Node>
public int count()
count
in interface NodeIterable<Node>
public boolean contains(Node node)
contains
in interface NodeIterable<Node>