AtomsetIterator
, MoleculesetIterator
, MoleculesetIteratorBoxDependent
public 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 MoleculesetIteratorBoxDependent
java.lang.NullPointerException
- if the Box is nullpublic void reset()
reset
in interface AtomsetIterator
java.lang.IllegalStateException
- if outer and inner lists have been set to the same instancepublic void unset()
unset
in interface AtomsetIterator
public IMoleculeList next()
next
in interface MoleculesetIterator
public int size()
size
in interface AtomsetIterator
public int nBody()
nBody
in interface AtomsetIterator