Package org.openscience.cdk.graph
Class AtomContainerBondPermutor
- java.lang.Object
-
- org.openscience.cdk.graph.Permutor
-
- org.openscience.cdk.graph.AtomContainerPermutor
-
- org.openscience.cdk.graph.AtomContainerBondPermutor
-
- All Implemented Interfaces:
Iterator<IAtomContainer>
public class AtomContainerBondPermutor extends AtomContainerPermutor
This class allows the user to iterate through the set of all possible permutations of the bond order in a given atom container. This provides a means to check the dependency of an algorithm's results on the bond order of the input atom container.Typical use:
AtomContainerBondPermutor permutor = new AtomContainerBondPermutor(container); while (permutor.hasNext()) { IAtomContainer permutedContainer = permutor.next(); ... }
- Author:
- maclean
- Source code:
- main
- Belongs to CDK module:
- standard
- Keywords:
- permutation
- Created on:
- 2009-09-09
-
-
Field Summary
-
Fields inherited from class org.openscience.cdk.graph.AtomContainerPermutor
atomContainer
-
-
Constructor Summary
Constructors Constructor Description AtomContainerBondPermutor(IAtomContainer atomContainer)
A permutor wraps the original atom container, and produces cloned (and permuted!) copies on demand.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAtomContainer
containerFromPermutation(int[] permutation)
Convert a permutation (expressed as a list of numbers) into a permuted atom container.-
Methods inherited from class org.openscience.cdk.graph.AtomContainerPermutor
next, randomNext, remove
-
Methods inherited from class org.openscience.cdk.graph.Permutor
calculateMaxRank, getCurrentPermutation, getNextPermutation, getRandomNextPermutation, getRank, hasNext, setPermutation, setRank
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext
-
-
-
-
Constructor Detail
-
AtomContainerBondPermutor
public AtomContainerBondPermutor(IAtomContainer atomContainer)
A permutor wraps the original atom container, and produces cloned (and permuted!) copies on demand.- Parameters:
atomContainer
- the atom container to permute
-
-
Method Detail
-
containerFromPermutation
public IAtomContainer containerFromPermutation(int[] permutation)
Description copied from class:AtomContainerPermutor
Convert a permutation (expressed as a list of numbers) into a permuted atom container. This will differ depending on the desired effect of the permutation (atoms or bonds, for example).- Specified by:
containerFromPermutation
in classAtomContainerPermutor
- Returns:
- the atom container corresponding to this permutation
-
-