The Octet Molecular Representation Framework v0.8.2

net.sf.octet.model
Interface HalfPlane

All Known Implementing Classes:
BasicHalfPlane, SimpleHalfPlane

public interface HalfPlane

A representation of the half plane concept. Imagine a plane defined by the line connecting a central Atom and one of its neighbors, and furthermore containing at least one additional neighbor Atom. If this plane is bisected by the line, two HalfPLanes result. Neither of these HalfPlane contain the two Atoms defining the line.

A HalfPlane contains three distict regions defined by bisecting it along the axis perpendicular to the atom-neighbor line: (1) a region above the bisecting line; (2) a region below the bisecting line; and (3) a region on the line. The regions above and below the line may contain zero, one, or more Atoms, arranged in order of increasing angle relative to the HalfPlane axis. Only zero or one Atom may appear on the bisecting line (see: getIntersectionAtom()).

A HalfPlane may or may not contain any Atoms, and both cases can result from legal Configurations.

The HalfPlane interface is adapted from concepts presented in a paper by Andreas Dietz (J. Chem. Inf. Comput. Sci. 1995, 35 , 787).

Author:
Richard Apodaca

Method Summary
 int countAtoms()
          Returns the number of Atoms contained by this HalfPlane.
 int countLowerAtoms()
          Returns the number of Atoms contained in the lower region of this HalfPlane.
 int countUpperAtoms()
          Returns the number of Atoms contained in the upper region of this HalfPlane.
 Atom getIntersectionAtom()
          Returns the Atom located at the bisector of this HalfPlane, or null if none exists.
 boolean hasIntersectionAtom()
          Returns true if this HalfPlane has an Atom located on the bisector, or false otherwise.
 AtomIterator iterateLowerAtoms()
          Returns an iterator over all Atoms appearing in the lower region of this HalfPlane.
 AtomIterator iterateUpperAtoms()
          Returns an iterator over all Atoms appearing in the upper region of this HalfPlane.
 

Method Detail

countAtoms

public int countAtoms()
Returns the number of Atoms contained by this HalfPlane.

Returns:
the number of Atoms contained by this HalfPlane

iterateLowerAtoms

public AtomIterator iterateLowerAtoms()
Returns an iterator over all Atoms appearing in the lower region of this HalfPlane.

Returns:
an iterator over all Atoms appearing in the lower region of this HalfPlane

countLowerAtoms

public int countLowerAtoms()
Returns the number of Atoms contained in the lower region of this HalfPlane.

Returns:
the number of Atoms contained in the lower region of this HalfPlane

iterateUpperAtoms

public AtomIterator iterateUpperAtoms()
Returns an iterator over all Atoms appearing in the upper region of this HalfPlane.

Returns:
an iterator over all Atoms appearing in the upper region of this HalfPlane

countUpperAtoms

public int countUpperAtoms()
Returns the number of Atoms contained in the upper region of this HalfPlane.

Returns:
the number of Atoms contained in the upper region of this HalfPlane

getIntersectionAtom

public Atom getIntersectionAtom()
Returns the Atom located at the bisector of this HalfPlane, or null if none exists. This is an optional operation. Implementors may throw an UnsupportedOperationException to indicate this.

Returns:
the Atom located at the bisector of this HalfPlane, or null if none exists
Throws:
java.lang.UnsupportedOperationException

hasIntersectionAtom

public boolean hasIntersectionAtom()
Returns true if this HalfPlane has an Atom located on the bisector, or false otherwise. This is an optional operation. Implementors may throw an UnsupportedOperationException to indicate this.

Returns:
code>true if this HalfPlane has an Atom located on the bisector, or false otherwise
Throws:
java.lang.UnsupportedOperationException

The Octet Molecular Representation Framework v0.8.2