#include "scalar.hh"
#include "lookup.hh"
#include "paper.hh"
+#include "request.hh"
#include "notehead.hh"
+
+NAME_METHOD(Local_key_item);
Local_key_item::Local_key_item(int i)
{
c0_position = i;
}
-
void
-Local_key_item::add (int o, int p , int a,Notehead*head_p)
+Local_key_item::add(Item*head_l)
+{
+ group.push(head_l);
+ dependencies.push(head_l);
+}
+void
+Local_key_item::add(Melodic_req*m_l)
+{
+ add(m_l->octave, m_l->notename, m_l->accidental);
+}
+void
+Local_key_item::add (int o, int p , int a)
{
Local_acc l;
l.octave = o;
l.name = p;
l.acc = a;
- accs.add(l);
- group.add(head_p);
- dependencies.add(head_p);
+ accs.push(l);
}
void
{
accs.sort(Local_acc::compare);
}
+
Molecule*
Local_key_item::brew_molecule_p()const
{
-
- Molecule* output = new Molecule;
+ Molecule* output = new Molecule;
Molecule*octmol = 0;
int lastoct = -100;
for (int i = 0; i < accs.size(); i++) {
output->add(*octmol);
delete octmol;
}
+
+ Interval head_width;
+ for (int i = 0; i < group.size(); i++) {
+ head_width.unite(group[i]->width());
+ }
+ output->translate(Offset(-output->extent().x.right + head_width.left ,0));
+
return output;
}
"LilyPond, a music typesetter.\n"
"Copyright (C) 1996,97 by\n"
" Han-Wen Nienhuys <hanwen@stack.nl>\n"
+ "Contributors\n"
" Jan-Nieuwenhuizen <jan@digicash.com>\n"
+ " Mats Bengtsson <matsb@s3.kth.se>\n"
"\n"
" This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License version 2\n"
struct Main_init {
Main_init() {
path = new File_path(LIBDIR);
- path->add(String(LIBDIR)+"init/");
+ path->push(String(LIBDIR)+"init/");
debug_init();
}
~Main_init() {
exit(0);
break;
case 'I':
- path->add(oparser.optarg);
+ path->push(oparser.optarg);
break;
case 'h':
help();
Array<int> allcons;
for (int i=0; i < opt->cons.size(); i++)
- allcons.add(0);
+ allcons.push(0);
for (int i=0; i < active.size(); i++) {
int j = active[i];
allcons[j]++;
{
// add indices
int cidx=inactive[k];
- active.add(cidx);
+ active.push(cidx);
inactive.swap(k,inactive.size()-1);
inactive.pop();
int q=active.size()-1;
// drop indices
- inactive.add(active[k]);
+ inactive.push(active[k]);
active.swap(k,q);
A.swap_rows(k,q);
active.pop();
opt(op)
{
for (int i=0; i < op->cons.size(); i++)
- inactive.add(i);
+ inactive.push(i);
Choleski_decomposition chol(op->quad);
H=chol.inverse();
}