AtomsetIterator, MoleculesetIterator, MoleculesetIteratorBoxDependentpublic class MpiInterspeciesAA extends java.lang.Object implements MoleculesetIteratorBoxDependent
| Constructor | Description |
|---|---|
MpiInterspeciesAA(ISpecies[] species) |
Constructs iterator that provides iterates taken from the molecules of
two species.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
nBody() |
Returns 2, indicating that this is a pair iterator
|
IMoleculeList |
next() |
Returns the next iterate pair.
|
void |
reset() |
Sets iterator in condition to begin iteration.
|
void |
setBox(Box box) |
Configures iterator to return molecules from the set species in the given
box.
|
int |
size() |
Returns the number of iterates, which is list.size*(list.size-1)/2
|
void |
unset() |
Sets iterator such that hasNext is false.
|
public MpiInterspeciesAA(ISpecies[] species)
species - array of two different, non-null speciesjava.lang.NullPointerException - if species or one of its elements is nulljava.lang.IllegalArgumentException - if species.length != 2 or if species[0] == species[1]public void setBox(Box box)
setBox in interface MoleculesetIteratorBoxDependentjava.lang.NullPointerException - if the Box is nullpublic void reset()
reset in interface AtomsetIteratorjava.lang.IllegalStateException - if outer and inner lists have been set to the same instancepublic void unset()
unset in interface AtomsetIteratorpublic IMoleculeList next()
next in interface MoleculesetIteratorpublic int size()
size in interface AtomsetIteratorpublic int nBody()
nBody in interface AtomsetIterator