|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.atom.iterator.AtomIteratorAllLeafType
public class AtomIteratorAllLeafType
Iterator for all the molecules of a set of species in a box. Each iterate is all the molecules in a box, with each Atom as the first atom in the set. This class is used by PotentialMaster to iterate over molecules for N-body potentials. This class is designed to work and conform to the API... not to be efficient or pleasant to look at! Use neighbor lists.
| Constructor Summary | |
|---|---|
AtomIteratorAllLeafType(IAtomType[] atomType)
|
|
| Method Summary | |
|---|---|
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(). |
IAtomList |
next()
Returns the next AtomSet iterate, or null if hasNext() is false. |
void |
reset()
Resets the iterator to loop through its iterates again. |
void |
setBox(IBox newBox)
Sets the box containing the molecules for iteration. |
void |
setDirection(IteratorDirective.Direction newDirection)
Has no effect, but is included as part of the AtomsetIteratorPDT interface. |
void |
setTarget(IAtom newTargetAtom)
Sets the target of iteration... |
int |
size()
Returns the number of iterates given by this iterator, if iterated after a call to reset(). |
void |
unset()
Puts iterator in a state in which hasNext() returns false. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtomIteratorAllLeafType(IAtomType[] atomType)
species - species for which molecules are returned as iterates. Only
species[0] is relevant, and must not be null.| Method Detail |
|---|
public void setBox(IBox newBox)
setBox in interface AtomsetIteratorBoxDependentpublic void setTarget(IAtom newTargetAtom)
setTarget in interface AtomsetIteratorTargetablepublic void setDirection(IteratorDirective.Direction newDirection)
setDirection in interface AtomsetIteratorDirectablepublic void reset()
AtomsetIterator
reset in interface AtomsetIteratorpublic void unset()
AtomsetIterator
unset in interface AtomsetIteratorpublic IAtomList next()
AtomLeafsetIterator
next in interface AtomLeafsetIteratorpublic int nBody()
AtomsetIterator
nBody in interface AtomsetIteratorpublic int size()
size in interface AtomsetIterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||