public:
/** solve the spacing problem
- return the column positions, and the energy (last element)
- */
+
+ @return the column positions, and the energy (last element)
+
+ */
Array<Real> solve() const;
- /// add a idealspacing to the problem.
+
/**
-
+ add a idealspacing to the problem.
One pair of columns can have no, one or more idealspacings,
since they can be "summed" if the columns to which #i# refers are
void add_ideal(const Idealspacing *i);
- /// add a col to the problem
- /** columns have to be added left to right. The column contains
+ /** add a col to the problem. columns have to be added left to right. The column contains
info on it's minimum width.
*/
void add_column(const PCol *, bool fixed=false, Real fixpos=0.0);
#include "plist.hh"
#include "item.hh"
-/// stuff grouped vertically.
+
/**
+ stuff grouped vertically.
This is a class to address items vertically. It contains the data for:
\begin{itemize}
\item
\item
the linespacing problem
\end{itemize}
- */struct PCol {
+ */
+
+struct PCol {
PointerList<const Item*> its;
PointerList<const Spanner*> stoppers, starters;
- /// prebreak is put before end of line.
- /**
+
+ /** prebreak is put before end of line.
if broken here, then (*this) column is discarded, and prebreak
is put at end of line, owned by Col
*/
void add(Item *i);
/// Can this be broken? true eg. for bars.
- bool breakable()const;
+ bool breakable_b()const;
Interval width() const;
~PCol();
PCol(PCol * parent);
- /// which col comes first?
/**
+ which col comes first?.
signed compare on columns.
- return < 0 if c1 < c2.
+ @return < 0 if c1 < c2.
*/static int compare(const PCol &c1, const PCol &c2);
#include "pcol.hh"
#include "pstaff.hh"
-/// all stuff which goes onto paper
+
+/** all stuff which goes onto paper. notes, signs, symbols in a score can be grouped in two ways:
+ horizontally (staffwise), and vertically (columns). #PScore#
+ contains the items, the columns and the staffs.
+ */
+
struct PScore {
Paperdef *paper_l_;
/// broken spanners
IPointerList<Spanner*> broken_spans;
- /****************/
+ /* *************** */
/* CONSTRUCTION */
PScore(Paperdef*);
void add(PStaff *);
- /// add item
- void typeset_item(Item *, PCol *,PStaff*,int=1);
+
+ /** add an item.
+ add the item in specified containers. If breakstatus is set
+ properly, add it to the {pre,post}break of the pcol.
+ */
+ void typeset_item(Item *item_p, PCol *pcol_l,PStaff*pstaf_l,int breakstatus=1);
/// add a Spanner
void typeset_spanner(Spanner*, PStaff*);
/* INSPECTION */
Array<Item*> select_items(PStaff*, PCol*);
- /// return argument as a cursor.
+ /**
+ @return argument as a cursor of the list
+ */
PCursor<PCol *> find_col(const PCol *)const;
/* MAIN ROUTINES */
/// delete unused columns
void clean_cols();
};
-/** notes, signs, symbols in a score can be grouped in two ways:
- horizontally (staffwise), and vertically (columns). #PScore#
- contains the items, the columns and the staffs.
- */
+
#endif
/// solve the problem using a projected gradient method
Vector solve(Vector start) const;
- /** return the number of variables in the problem */
+ /**
+ @return the number of variables in the problem
+ */
int dim() const{
return lin.dim();
}
};
-/// Quadratic programming with mixed linear constraints
+
/**
+ Quadratic programming with mixed linear constraints.
problem definition of a quadratic optimisation problem with linear
inequality and equality constraints
Vector vec(int k) const { return opt->cons[k]; }
Real rhs(int k) const { return opt->consrhs[k]; }
- /// drop constraint
- /** drop constraint k from the active set. k is the index of the
+
+ /** drop constraint. drop constraint k from the active set. k is the index of the
constraint in #active#
*/
void drop (int k);
- /// add constraint j
- /**
+
+ /** add constraint j.
add constraint j to the active set j is the index of the
constraint in #inactive#
*/
#include "proto.hh"
#include "staffelem.hh"
-/// a symbol which is attached between two columns.
-/** A spanner is a symbol which spans across several columns, so its
+
+/** a symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its
final appearance can only be calculated after the breaking problem
is solved.
Spanner *broken_at(PCol *c1, PCol *c2) const;
virtual Spanner* spanner() { return this; }
protected:
- /// clone a piece of this spanner.
+
/**
-
+ clone a piece of this spanner.
PRE
c1 >= start, c2 <= stop
*/
/*
- stem.hh --
+ stem.hh -- declare Stem
(c) 1996,97 Han-Wen Nienhuys
*/
#include "varray.hh"
#include "moment.hh"
-/// the rule attached to the ball
-/**
+
+/**the rule attached to the ball.
takes care of:
\begin{itemize}
*/
struct Stem : Item {
-/*
- /// rhythmical length
- Moment note_length;
- */
- // heads the stem encompasses (positions)
+ /// heads that the stem encompasses (positions)
int minnote, maxnote;
/// false if in beam
/// needed for determining direction/length
int staff_center;
- // extent of the stem (positions)
- /**
+
+ /**extent of the stem (positions).
fractional, since Beam has to adapt them.
*/
/// flagtype? 4 none, 8 8th flag, 0 = beam.
int flag;
- ///geen gedonder, jij gaat onder
+
/**
+ geen gedonder, jij gaat onder.
-1 stem points down, +1: stem points up
*/
#include "boxes.hh"
#include "scalar.hh"
-/// parameter substitution in TeXstrings
-/**
+/** parameter substitution in TeXstrings.
this function provides a simple macro mechanism:
if source == "tex%bla%", then
#include "directionalspanner.hh"
#include "textdef.hh"
-/// a spanner which puts texts on top of other spanners.
-/**
- Use for triplets, eentweetjes, ottava, etc.
- */
+/** a spanner which puts texts on top of other spanners. Use for
+ triplets, eentweetjes, ottava, etc. */
struct Text_spanner : Spanner {
Text_def spec;
Offset text_off_;
#include <iostream.h>
#include "string.hh"
-/// TeX output
-/**
+
+/** TeX output.
Use this class for writing to a TeX file.
It counts braces to prevent nesting errors, and
it will add a comment sign before each newline.
#include "plist.hh"
#include "moment.hh"
-/// class for horizontal stuff.
-/**
+/** class for horizontal stuff.
Voice is a ordered row of Voice_elements. It is strictly horizontal:
you cannot have two rhythmic elements running parallel in a Voice
void print() const;
void set_default_group(String id);
};
-/// one horizontal bit.
-/** Apart from being a container for the requests, Voice_element is nothing
+
+/** one horizontal bit. Apart from being a container for the requests, Voice_element is nothing
*/
struct Voice_element {
Moment duration;
- char const* defined_ch_c_l_m;
+ char const* defined_ch_c_l_;
const Voice *voice_l_;
IPointerList<Request*> reqs;