AtomsetIterator
, MoleculesetIterator
, java.io.Serializable
public final class MpiInnerFixed extends java.lang.Object implements MoleculesetIterator, java.io.Serializable
Iterator can be condition to put the atoms in either order in the AtomPair that it returns. Thus the inner-loop Atom may be atom0 of the returned AtomPair, or it may be atom1. This behavior is set at construction, and cannot be changed afterwards. Default behavior has outer loop atoms as atom0, and inner loop atoms as atom1.
Constructor | Description |
---|---|
MpiInnerFixed(MoleculeIterator aiOuter,
MoleculeIterator aiInner,
boolean doSwap) |
Construct a pair iterator using the given atom iterators, indicating
whether the atoms ordering in the AtomPair should be swapped from the
default behavior.
|
Modifier and Type | Method | Description |
---|---|---|
MoleculeIterator |
getInnerIterator() |
Accessor method for the inner-loop atom iterator.
|
MoleculeIterator |
getOuterIterator() |
Accessor method for the outer-loop atom iterator.
|
int |
nBody() |
Returns the number of atoms given in each iterate, i.e., the
size of the atom array returned with each call to next().
|
IMoleculeList |
next() |
Returns the next pair of atoms.
|
void |
reset() |
Resets the iterator, so that it is ready to go through all of its pairs.
|
int |
size() |
Returns the number of pairs given by this iterator.
|
void |
unset() |
Sets the iterator such that hasNext is false.
|
public MpiInnerFixed(MoleculeIterator aiOuter, MoleculeIterator aiInner, boolean doSwap)
aiOuter
- outer-loop iteratoraiInner
- inner-loop iteratorpublic MoleculeIterator getOuterIterator()
public MoleculeIterator getInnerIterator()
public void unset()
unset
in interface AtomsetIterator
public int size()
size
in interface AtomsetIterator
public void reset()
reset
in interface AtomsetIterator
public final IMoleculeList next()
next
in interface MoleculesetIterator
public final int nBody()
AtomsetIterator
nBody
in interface AtomsetIterator