Class FieldsFromIntervals.Item

java.lang.Object
eu.bandm.music.comp.FieldsFromIntervals.Item
Enclosing class:
FieldsFromIntervals

protected class FieldsFromIntervals.Item extends Object
Each Item represents one construction step of a field.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final int
    The number of sounding pitch classes, minus one.
    (package private) final int
    The pitch class which is added by this step.
    (package private) final @Opt FieldsFromIntervals.Item
    The preceding field, which is enhanced by this step.
    (package private) final SortedSet<Integer>
    The set of required intervals, that are those allowed intervals which do not yet appear.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Item(FieldsFromIntervals.Item pre, int interval)
    Constructor for a derivation step which enhances the field by adding a further pitch class on the top of an existing field.
    Constructor for the root item which represents the starting pitch class (symbolically =0), has no predecessor and requires all intervals.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    isUsed(int i)
    Return whether the pitch class is already present somewhere in the field.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pre

      The preceding field, which is enhanced by this step.
    • pos

      final int pos
      The pitch class which is added by this step.
    • level

      final int level
      The number of sounding pitch classes, minus one.
    • requiredIntervals

      final SortedSet<Integer> requiredIntervals
      The set of required intervals, that are those allowed intervals which do not yet appear.
  • Constructor Details

    • Item

      Item(SortedSet<Integer> allInts)
      Constructor for the root item which represents the starting pitch class (symbolically =0), has no predecessor and requires all intervals.
    • Item

      Item(FieldsFromIntervals.Item pre, int interval)
      Constructor for a derivation step which enhances the field by adding a further pitch class on the top of an existing field.
      Parameters:
      pre - the predessor field.
      interval - by which the top pitch of the "pre" field shall be topped.
  • Method Details

    • isUsed

      boolean isUsed(int i)
      Return whether the pitch class is already present somewhere in the field.