Class AtomContainerPermutor

java.lang.Object
org.openscience.cdk.graph.Permutor
org.openscience.cdk.graph.AtomContainerPermutor
All Implemented Interfaces:
Iterator<IAtomContainer>
Direct Known Subclasses:
AtomContainerAtomPermutor, AtomContainerBondPermutor

public abstract class AtomContainerPermutor extends Permutor implements Iterator<IAtomContainer>
The base class for permutors of atom containers, with a single abstract method containerFromPermutation that should be implemented in concrete derived classes.
Author:
maclean
Source code:
main
Belongs to CDK module:
standard
Keywords:
permutation
Created on:
2009-09-09
  • Field Details

    • atomContainer

      protected final IAtomContainer atomContainer
      The atom container that is permuted at each step.
  • Constructor Details

    • AtomContainerPermutor

      public AtomContainerPermutor(int size, IAtomContainer atomContainer)
      Start the permutor off with an initial atom container, and the size of the permutation.
      Parameters:
      atomContainer -
  • Method Details

    • containerFromPermutation

      public abstract IAtomContainer containerFromPermutation(int[] permutation)
      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).
      Returns:
      the atom container corresponding to this permutation
    • randomNext

      public IAtomContainer randomNext()
      Get a new container, but randomly skip forwards in the list of possible permutations to generate it.
      Returns:
      a random next permuted atom container
    • next

      public IAtomContainer next()
      Specified by:
      next in interface Iterator<IAtomContainer>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<IAtomContainer>