Class MSplitter.Result

java.lang.Object
eu.bandm.music.entities.MSplitter.Result
Enclosing class:
MSplitter

public class MSplitter.Result extends Object
Represents one result of processing a sequence of qualified durations. It contains a set of all nodes which must be printed, and, for convenience, a map from each such node to the total duration which it must represent.
  • Field Details

    • eventStarts

      protected final List<QualifiedRational> eventStarts
      The original input to the splitter process.
    • initialCoverage

      protected List<List<MTree>> initialCoverage
      The intermediately calculated IC.
    • printed

      protected final Set<MTree> printed
      The result: Set of the nodes, the start points of which carry a note symbol.
    • summedDuration

      protected final Map<MTree,Rational> summedDuration
      Convenience cache: The duration represented by the printed note symbols coming from MXs=merging transformations.
    • stemEnds

      protected final Map<MTree,StemEnd> stemEnds
      The beams of the printed note symbols.
    • printables_transformed

      protected final Map<MTree,MTree.Printable> printables_transformed
      FIXME DOCU
    • additionalProportions

      protected final Set<MTree> additionalProportions
      Recognized dotted structures which possibly require an additional proportion. The first node is memorized here. FIXME NOT YET SUPPORTED
  • Constructor Details

    • Result

      public Result(List<QualifiedRational> eventStarts)
      Construct an instance with all result fields not yet set.
  • Method Details

    • getStemEnd

      protected StemEnd getStemEnd(MTree node)
      Get the stem end (left and right long and short beams) for the given node. The map in this result overrides the genuine beams from the MTree specification.
    • getEventStarts

      public List<QualifiedRational> getEventStarts()
      Get an unmodifiable copy of the original event starts.
    • getEventStart

      public QualifiedRational getEventStart(int i)
      Get the event start value.
    • getBracketDepth

      public int getBracketDepth()
      Returns the maximal level of nesting of MTree.EssentialBrackets under this node.
    • sumUp

      protected void sumUp()
      Add the durations of all nodes not being printed to their predecessor. A node appears as a key in summedDuration only if it the result of a merging transformation. So it holds that "domain(summedDuration) subsetEq printed". Create a new StemEnd for the printed node, if necessary. (The sum values are somehow redundant and only for the convenience of the caller.)
    • putSum

      void putSum(MTree node, Rational dura)
    • adjustBeams

      protected void adjustBeams()
      Creates new StemEnd} according to the connection situation between neighbour stems. Genuine beam modifications (in- and decrease of connections) is applied, according to the number of printed noted symbols.
    • countPrintedChilds

      void countPrintedChilds(int[] result, MTree left, MTree right)
    • adjustBeamsLocally

      void adjustBeamsLocally(MTree node, StemEnd se)
      Remove stemlets considered redundant according to MTree.parameters. Operates on the local data of one single StemEnd.
    • dump

      public void dump()
      Printing method for debugging and demonstration.
    • get_InitialCoverage

      public List<List<MTree>> get_InitialCoverage()
      Return the initial coverage calculated during the msplit process.
    • dumpResult

      public void dumpResult(PrintStream ps)
      Display the result of a metric split by displaying the sequence of call-back invocations.
    • dumpResult

      public void dumpResult()
      Display the result of a metric split by displaying the sequence of call-back invocations to System.err. .