]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.18
authorfred <fred>
Tue, 26 Mar 2002 21:52:39 +0000 (21:52 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:52:39 +0000 (21:52 +0000)
15 files changed:
flower/dictionary.cc [deleted file]
flower/include/assoc-iter.hh [deleted file]
flower/include/assoc.hh [deleted file]
lily/cbeam-engraver.cc [deleted file]
lily/ctie-engraver.cc [deleted file]
lily/include/break-caching.hh [deleted file]
lily/include/cbeam-engraver.hh [deleted file]
lily/include/ctie-engraver.hh [deleted file]
lily/include/linear-programming.hh [deleted file]
lily/include/plet-swallow-engraver.hh [deleted file]
lily/include/ties-engraver.hh [deleted file]
lily/linear-programming.cc [deleted file]
lily/plet-engraver.cc [deleted file]
lily/plet-swallow-engraver.cc [deleted file]
lily/ties-engraver.cc [deleted file]

diff --git a/flower/dictionary.cc b/flower/dictionary.cc
deleted file mode 100644 (file)
index 2d200f2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#if 0
-
-
-/**
-   Dictionary implementation.  Please fix me.
-
-   (neuk. hsearch_* is te dom.)
- */
-template<class T>
-class Dictionary<T>
-{
-  hsearch_data * hash_p_;
-  
-public:
-  Dictionary ();
-  ~Dictionary ();
-  Dictionary (Dictionary const&);
-  T &elem (String s);
-  T const &elem (String s) const;
-  bool elem_b (String s) const;
-  void add (String, T);
-  void clear ();
-}
-
-Dictionary::Dictionary ()
-{
-  hash_p_ = new hsearch_data;
-  hash_p_->table = 0;
-
-  int start_size = 51;
-  int retval = hcreate_r (start_size, hash_p_);
-
-  assert (retval);
-}
-
-
-
-#endif
diff --git a/flower/include/assoc-iter.hh b/flower/include/assoc-iter.hh
deleted file mode 100644 (file)
index f1ba2f8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  associter.hh -- part of flowerlib
-
-  (c) 1996 Han-Wen Nienhuys
-*/
-
-#ifndef ASSOCITER_HH
-#define ASSOCITER_HH
-
-#include "assoc.hh"
-
-/// an iterator for the #Assoc# class
-template<class K, class V>
-struct Assoc_iter {
-    int i;
-    Assoc<K,V> &assoc_;
-    /// we don't want to be bothered by const correctness
-    Assoc_iter (const Assoc<K,V> &a) :
-       assoc_((Assoc<K,V> &)a)
-    {  
-       i= next (0);
-    }
-    int next (int j) {
-       while (j < assoc_.arr.size() && assoc_.arr[j].free)
-           j++;
-       return j;
-    }
-    bool ok() const {
-       return i < assoc_.arr.size();
-    }
-    void OK() const {
-       assert (!ok() || !assoc_.arr[i].free);
-    }
-    void operator++(int) { i++; i = next (i); }
-    K key() { return assoc_.arr[i].key; }
-    V &val() { return assoc_.arr[i].val; }    
-};
-
-#endif
diff --git a/flower/include/assoc.hh b/flower/include/assoc.hh
deleted file mode 100644 (file)
index c0b3f5f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef ASSOC_HH
-#define ASSOC_HH
-
-#include "array.hh"
-#include <assert.h>
-
-/**
-  A helper for Assoc
- */
-template<class K, class V>
-struct Assoc_ent_ {
-  bool free;
-  K key;
-  V val;
-};
-
-
-/** mindblowingly stupid Associative array implementation.
-  Hungarian: map
-
-  TODO: a decent hash for strings.
- */
-template<class K, class V>
-struct Assoc {
-  Array< Assoc_ent_<K,V> > arr;
-
-  /* ************** */
-    
-  int find (K key) const {
-    for (int i = 0; i < arr.size(); i++) {
-      if (!arr[i].free && key == arr[i].key)
-       return i;
-    }
-    return -1;
-  }
-  int find_creat (K key) {
-    int free = -1;
-    for (int i = 0; i < arr.size(); i++) {
-      if (!arr[i].free && key == arr[i].key) {         
-       return i;
-      } else if (arr[i].free) {
-       free = i;
-      }
-    }
-    if (free >= 0){
-      arr[free].free = false;
-      arr[free].key = key;
-      return free;
-    }
-
-    Assoc_ent_<K,V> ae;
-    ae.free = false;
-    ae.key = key;
-    arr.push (ae);
-    return arr.size() -1;
-  }
-public:
-  bool elem_b (K key) const {
-    return find (key) >= 0;
-  }
-  void del (K key) {
-    assert (elem_b (key));
-    int i= find (key);
-    arr[i].free = true;
-  }
-  void add (K key, V val) {
-    int i = find_creat (key);
-    arr[i].val = val;
-  }
-  V& elem (K key) {
-    return arr[find_creat (key)].val;
-  }
-  V& operator[](K key) {
-    return elem (key);
-  }
-  V const & operator[](K key) const {
-    return elem (key);
-  }
-  V const & elem (K key) const { 
-    assert (elem_b (key));
-    return arr[find (key)].val;
-  }
-  void clear () 
-  {
-    for (int i=0 ;  i < arr.size (); i++)
-      arr[i].free = true;
-  }
-};
-
-#endif
diff --git a/lily/cbeam-engraver.cc b/lily/cbeam-engraver.cc
deleted file mode 100644 (file)
index 1b65892..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*   
-  cbeam-engraver.cc --  implement Command_beam_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "cbeam-engraver.hh"
-#include "musical-request.hh"
-#include "beam.hh"
-#include "grouping.hh"
-#include "stem.hh"
-#include "warn.hh"
-#include "time-description.hh"
-
-Command_beam_engraver::Command_beam_engraver ()
-{
-  beam_p_ = 0;
-  finished_beam_p_ =0;
-  finished_grouping_p_ = 0;
-  grouping_p_ =0;
-  reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0;
-}
-
-bool
-Command_beam_engraver::do_try_music (Music *m)
-{
-  if (Beam_req * c = dynamic_cast<Beam_req*>(m))
-    {
-      reqs_drul_[c->spantype_] = c;
-      return true;
-    }
-  return false;
-}
-
-
-void
-Command_beam_engraver::do_process_requests ()
-{
-  if (reqs_drul_[STOP])
-    {
-      if (!beam_p_)
-       reqs_drul_[STOP]->warning (_("No beam to stop"));
-      finished_beam_p_ = beam_p_;
-      finished_grouping_p_ = grouping_p_;
-
-      beam_p_ = 0;
-      grouping_p_ = 0;
-    }
-  
-  if (reqs_drul_[START])
-    {
-      beam_p_ = new Beam;
-      grouping_p_ = new Rhythmic_grouping;
-
-      Scalar prop = get_property ("beamslopedamping");
-      if (prop.isnum_b ()) 
-       beam_p_->damping_i_ = prop;
-
-      prop = get_property ("beamquantisation");
-      if (prop.isnum_b ()) 
-       beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
-      announce_element (Score_element_info (beam_p_, reqs_drul_[START]));
-    }
-}
-
-void
-Command_beam_engraver::typeset_beam ()
-{
-  if (finished_beam_p_)
-    {
-      Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
-      rg_C->extend (finished_grouping_p_->interval());
-      finished_beam_p_->set_grouping (*rg_C, *finished_grouping_p_);
-      typeset_element (finished_beam_p_);
-      finished_beam_p_ = 0;
-    
-      delete finished_grouping_p_;
-      finished_grouping_p_= 0;
-    
-      reqs_drul_[STOP] = 0;
-    }
-}
-
-void
-Command_beam_engraver::do_post_move_processing ()
-{
-  reqs_drul_ [START] =0;
-}
-
-void
-Command_beam_engraver::do_pre_move_processing ()
-{
-  typeset_beam ();
-}
-
-void
-Command_beam_engraver::do_removal_processing ()
-{
-  typeset_beam ();
-  finished_beam_p_ = beam_p_;
-  finished_grouping_p_ = grouping_p_;
-  typeset_beam ();
-}
-
-void
-Command_beam_engraver::acknowledge_element (Score_element_info info)
-{
-    if (beam_p_)
-      {
-       Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_);
-       if (!stem_l)
-         return;
-
-
-       Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
-       if (!rhythmic_req)
-         {
-           String s=_("Stem must have Rhythmic structure.");
-           if (info.req_l_)
-             info.req_l_->warning(s);
-           else
-             ::warning (s);
-         
-           return;
-         }
-      
-
-       if (rhythmic_req->duration_.durlog_i_<= 2)
-         {
-           rhythmic_req->warning (_ ("stem doesn't fit in beam"));
-           return;
-         }
-
-       /*
-         TODO: do something sensible if it doesn't fit in the beam.
-       */
-       Moment start = get_staff_info().time_C_->whole_in_measure_;
-
-       if (!grouping_p_->child_fit_b (start))
-         {
-           String s (_("please fix me") + ": " 
-                     + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
-
-           if (info.req_l_)
-             info.req_l_->warning(s);
-           else 
-             warning (s);
-         }
-       else
-         {
-           grouping_p_->add_child (start, rhythmic_req->duration ());
-           stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
-           beam_p_->add_stem (stem_l);
-         }
-      }
-}
-
-
-
-ADD_THIS_TRANSLATOR(Command_beam_engraver);
diff --git a/lily/ctie-engraver.cc b/lily/ctie-engraver.cc
deleted file mode 100644 (file)
index 662a554..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*   
-  ctie-engraver.cc --  implement Command_tie_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "ctie-engraver.hh"
-#include "command-request.hh"
-#include "note-head.hh"
-#include "musical-request.hh"
-#include "tie.hh"
-
-Command_tie_engraver::Command_tie_engraver()
-{
-  req_l_ = 0;
-}
-
-
-bool
-Command_tie_engraver::do_try_music (Music *m)
-{
-  if (Command_tie_req * c = dynamic_cast<Command_tie_req*> (m))
-    {
-      req_l_ = c;
-      return true;
-    }
-  return false;
-}
-
-void
-Command_tie_engraver::acknowledge_element (Score_element_info i)
-{
-  if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
-    {
-      Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
-      now_heads_.push (CHead_melodic_tuple (nh, m, now_moment()+ m->duration ()));
-    }
-}
-
-void
-Command_tie_engraver::do_process_requests ()
-{
-  if (req_l_)
-    {
-      Moment now = now_moment ();
-      Link_array<Note_head> nharr;
-      
-      stopped_heads_.clear ();
-      while (past_notes_pq_.size ()
-            && past_notes_pq_.front ().end_ == now)
-       stopped_heads_.push (past_notes_pq_.get ());
-
-    }
-}
-
-void
-Command_tie_engraver::process_acknowledged ()
-{
-  if (req_l_)
-    {
-      if (now_heads_.size () != stopped_heads_.size ())
-       {
-         req_l_->warning ("Unequal number of note heads for tie");
-       }
-      int sz = now_heads_.size () <? stopped_heads_.size ();
-
-      // hmm. Should do something more sensible.
-      // because, we assume no more noteheads come along after the 1st pass.
-      if (sz > tie_p_arr_.size ())
-       {
-         now_heads_.sort (CHead_melodic_tuple::pitch_compare);
-         stopped_heads_.sort(CHead_melodic_tuple::pitch_compare);
-
-         for (int i=0; i < sz; i++)
-           {
-             Tie * p = new Tie;
-             p->set_head (LEFT, stopped_heads_[i].head_l_);
-             p->set_head (RIGHT, now_heads_[i].head_l_);
-             tie_p_arr_.push (p);
-             announce_element (Score_element_info (p, req_l_));
-           }
-       }
-    }
-}
-
-void
-Command_tie_engraver::do_pre_move_processing ()
-{
-  for (int i=0; i < now_heads_.size (); i++)
-    {
-      past_notes_pq_.insert (now_heads_[i]);
-    }
-  now_heads_.clear( );
-  
-  for (int i=0; i<  tie_p_arr_.size (); i++)
-    {
-      typeset_element (tie_p_arr_[i]);
-    }
-  tie_p_arr_.clear ();
-}
-
-void
-Command_tie_engraver::do_post_move_processing ()
-{
-  req_l_ =0;
-  Moment now = now_moment ();
-  while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
-    past_notes_pq_.delmin ();
-}
-
-
-
-ADD_THIS_TRANSLATOR(Command_tie_engraver);
-
-
-CHead_melodic_tuple::CHead_melodic_tuple ()
-{
-  head_l_ =0;
-  mel_l_ =0;
-  end_ = 0;
-}
-
-CHead_melodic_tuple::CHead_melodic_tuple (Note_head *h, Melodic_req*m, Moment mom)
-{
-  head_l_ = h;
-  mel_l_ = m;
-  end_ = mom;
-}
-
-int
-CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
-                            CHead_melodic_tuple const &h2)
-{
-  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
-}
-
-int
-CHead_melodic_tuple::time_compare (CHead_melodic_tuple const&h1,
-                            CHead_melodic_tuple const &h2)
-{
-  return (h1.end_ - h2.end_ ).sign ();
-}
diff --git a/lily/include/break-caching.hh b/lily/include/break-caching.hh
deleted file mode 100644 (file)
index 706c5c3..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-  break-caching.hh -- declare Break_caching
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef BREAK_CACHING_HH
-#define BREAK_CACHING_HH
-
-/**
-  TODO : store breakpoints on the disk.
- */
-struct Break_caching : Break_algorithm
-{
-    void do_set_pscore();
-    Array<Column_x_positions> do_solve() const;
-};
-
-    
-#endif // BREAK_CACHING_HH
diff --git a/lily/include/cbeam-engraver.hh b/lily/include/cbeam-engraver.hh
deleted file mode 100644 (file)
index d041f41..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*   
-  cbeam-engraver.hh -- declare Command_beam_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef CBEAM_ENGRAVER_HH
-#define CBEAM_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "drul-array.hh"
-
-class Command_beam_engraver : public Engraver {
-  Drul_array<Beam_req*> reqs_drul_;
-
-  Beam *finished_beam_p_;
-  Beam *beam_p_;
-
-  Rhythmic_grouping*grouping_p_;
-  Rhythmic_grouping*finished_grouping_p_;
-  
-  void typeset_beam ();
-protected:
-  virtual void do_pre_move_processing ();
-  virtual void do_post_move_processing ();
-  virtual void do_removal_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests ();
-public:
-  Command_beam_engraver ();
-  VIRTUAL_COPY_CONS (Translator);
-};
-
-#endif /* CBEAM_ENGRAVER_HH */
-
diff --git a/lily/include/ctie-engraver.hh b/lily/include/ctie-engraver.hh
deleted file mode 100644 (file)
index 0242fd0..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*   
-  ctie-engraver.hh -- declare Command_tie_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef CTIE_ENGRAVER_HH
-#define CTIE_ENGRAVER_HH
-
-#include "pqueue.hh"
-#include "engraver.hh"
-
-struct CHead_melodic_tuple {
-  Melodic_req *mel_l_ ;
-  Note_head *head_l_;
-  Moment end_;
-  CHead_melodic_tuple ();
-  CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
-  static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
-  static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);  
-};
-
-inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
-{
-  return CHead_melodic_tuple::time_compare (a,b);
-}
-
-
-class Command_tie_engraver : public Engraver
-{
-  PQueue<CHead_melodic_tuple> past_notes_pq_;
-  Command_tie_req *req_l_;
-  Array<CHead_melodic_tuple> now_heads_;
-  Array<CHead_melodic_tuple> stopped_heads_;
-  Link_array<Tie> tie_p_arr_;
-  
-protected:
-  virtual void do_post_move_processing ();
-  virtual void do_pre_move_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests ();
-  virtual void process_acknowledged ();
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Command_tie_engraver();
-  
-};
-
-#endif /* CTIE_ENGRAVER_HH */
-
diff --git a/lily/include/linear-programming.hh b/lily/include/linear-programming.hh
deleted file mode 100644 (file)
index 6ba38ea..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*   
-  linear-programming.hh -- declare Linear_programming
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef LINEAR_PROGRAMMING_HH
-#define LINEAR_PROGRAMMING_HH
-
-#include "linear-programming.hh"
-
-/**
-
-   Solve the following problem:
-   
-   min c* x
-
-   constraints_[i] * x = constraint_rhss_ [i]
-   
-   x[j] >= 0
-*/
-
-class Linear_programming
-{
-  Array<Vector> constraints_;
-  Array<Real> constraint_rhss_;
-  Vector cost_vec_;
-  int dim_;
-public:
-  Vector constraint_solve (Vector initial_basic_solution) const;
-
-  int dim () const;
-  Vector solve (Vector) const;
-  void add_constraint (Vector c, double r);
-
-  
-  Linear_programming (int n);
-  void set_cost (Vector);
-  void print () const;
-  void OK () const;
-}
-
-#endif /* LINEAR_PROGRAMMING_HH */
-
diff --git a/lily/include/plet-swallow-engraver.hh b/lily/include/plet-swallow-engraver.hh
deleted file mode 100644 (file)
index 1458589..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-  plet-swallow-engraver.hh -- declare Swallow_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef PLET_SWALLOW_ENGRAVER_HH
-#define PLET_SWALLOW_ENGRAVER_HH
-
-#include "swallow-engraver.hh"
-
-/**
-  This engraver swallows plets silently.
- */
-class Plet_swallow_engraver : public Swallow_engraver 
-{
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  
-
-protected:
-  virtual bool do_try_music (Music*);
-};
-
-#endif // PLET_SWALLOW_ENGRAVER_HH
diff --git a/lily/include/ties-engraver.hh b/lily/include/ties-engraver.hh
deleted file mode 100644 (file)
index 900c7db..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  tie-engraver.hh -- declare Ties_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef Ties_GRAV_HH
-#define Ties_GRAV_HH
-
-#include "engraver.hh"
-
-struct Head_melodic_tuple {
-  Melodic_req *mel_l_ ;
-  Note_head *head_l_;
-
-  Head_melodic_tuple ();
-  Head_melodic_tuple (Note_head*, Melodic_req*);
-  static int compare (Head_melodic_tuple const &, Head_melodic_tuple const &);
-};
-
-class Ties_engraver : public Engraver {
-  Link_array<Tie> end_tie_p_arr_;
-  Link_array<Tie> tie_p_arr_;
-
-  Tie_req *req_l_;
-  Tie_req *end_req_l_;
-  Array<Head_melodic_tuple> head_mel_tuple_arr_;
-  Array<Head_melodic_tuple> left_head_mel_tuple_arr_;  
-  int processed_ack_pass_i_;
-  
-  Link_array<Melodic_req *> end_melodic_req_l_arr_;
-  Link_array<Melodic_req *> melodic_req_l_arr_;
-    
-protected:
-  virtual void do_removal_processing ();
-  virtual void acknowledge_element (Score_element_info);
-  virtual bool do_try_music (Music*);
-  virtual void do_process_requests();
-  virtual void process_acknowledged ();
-  virtual void do_post_move_processing();
-  virtual void do_pre_move_processing();
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Ties_engraver();
-  
-};
-
-#endif // Ties_GRAV_HH
diff --git a/lily/linear-programming.cc b/lily/linear-programming.cc
deleted file mode 100644 (file)
index 727d3fc..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*   
-  linear-programming.cc --  implement 
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#if 0
-#include "linear-programming.hh"
-
-Linear_programming::Linear_programming (int n)
-  : cost_vec_ (n)
-{
-  dim_ = n;  
-}
-int
-Linear_programming::dim () const
-{
-  return dim_;
-}
-
-
-void
-Linear_programming::add_constraint (Vector c, double r)
-{
-  assert (c.dim () == cost_vec_);
-  constraints_.push (c);
-  constraint_rhss_.push (r);
-}
-
-void
-Linear_programming::set_cost (Vector c)
-{
-  assert (dim_ == c.dim ());
-  cost_vec_ = c;
-}
-
-void
-Linear_programming::print () const
-{
-  DOUT << "cost: " << cost_vec_;
-  for (int i=0; constraints_.size (); i++)
-    {
-      DOUT << constraints_[i] << ". x = " << constraint_rhss_[i];
-    }
-}
-
-void
-Linear_programming::OK () const
-{
-  assert (constraint_rhss_.size () == constraints_.size ());
-  for (int i=0; constraints_.size (); i++)
-    constraints_[i].dim () == cost_vec_.dim ();
-}
-
-
-bool
-Linear_programming::check_constraints (Vector v) const
-{
-  bool is_cool = true;
-  assert (v.dim () == dim_);
-  
-  for (int i=0; is_cool && i < v.dim (); i++)
-    is_cool = is_cool && v[i] >= 0;
-  for (int i=0; is_cool && i < constraints_.size (); i++)  
-    is_cool = is_cool && (constraints_[i] * v <= constraint_rhss_[i]);
-
-
-
-  return is_cool;
-}
-
-Vector
-Linear_programming::solve (Vector initial_basic_solution) const
-{
-  assert (check_constraints (initial_basic_solution));
-  
-  Array<bool> basis; 
-  for (int i=0; i < dim_; i++)
-    basis.push (bool(initial_basic_solution[i]));
-
-  Vector x = initial_basic_solution;
-  Real current_cost = x * cost_vec_;
-  while (iter < MAXITER)
-    {
-      // select pivot
-      
-
-      iter ++;
-    }
-
-
-
-      
-  
-  Array<int> binding, nonbinding;
-  
-  assert (check_constraints (initial));
-  OK ();
-
-  Vector x (initial);
-  Real value (x * cost_vec_):
-  
-  for (int i=0; i < constraints_.size ())
-    nonbinding.push (i);
-
-  while  ()
-    {
-      get_negative_index (
-    }
-  
-}
-#endif
diff --git a/lily/plet-engraver.cc b/lily/plet-engraver.cc
deleted file mode 100644 (file)
index ff85567..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#if 0
-/*
-  plet-engraver.cc -- implement Plet_engraver
-
-  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "proto.hh"
-#include "musical-request.hh"
-#include "plet-engraver.hh"
-#include "plet-spanner.hh"
-#include "text-def.hh"
-#include "beam.hh"
-#include "score-column.hh"
-#include "stem.hh"
-
-
-ADD_THIS_TRANSLATOR (Plet_engraver);
-
-Plet_engraver::Plet_engraver ()
-{
-  beam_mom_drul_[LEFT] = span_mom_drul_[LEFT] = INT_MAX;
-  beam_mom_drul_[RIGHT] = span_mom_drul_[LEFT] = -INT_MAX;
-  plet_spanner_p_ = 0;
-  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-}
-
-void
-Plet_engraver::acknowledge_element (Score_element_info i)
-{
-
-  Stem * st = (dynamic_cast<Stem *> (i.elem_l_));
-  if (!st)
-    return;
-  if (!plet_spanner_p_)
-    return;
-  if (!span_reqs_drul_[LEFT])
-    return;
-
-  if (!plet_spanner_p_->stem_l_drul_[LEFT])
-    plet_spanner_p_->set_stem (LEFT, st);
-  else
-    if (span_reqs_drul_[RIGHT] && !plet_spanner_p_->stem_l_drul_[RIGHT]) 
-      plet_spanner_p_->set_stem (RIGHT, st);
-}
-
-bool
-Plet_engraver::do_try_music (Music* req_l)
-{
-  /*
-    UGH! This is incorrect!
-    Beam_req might not reach the Plet_engraver if ordering is wrong!
-   */
-  Beam_req* b = dynamic_cast <Beam_req *> (req_l);
-  if (b)
-    {
-      if (b->spantype_)
-        {
-          Direction d = (Direction)(((int)(b->spantype_ - 1)) * 2 - 1);
-          beam_mom_drul_[d] = get_staff_info ().musical_l ()->when ();
-       }
-      return false;
-    }
-    
-  Plet_req* p = dynamic_cast <Plet_req *> (req_l);
-  if (!p)
-    return false;
-
-  if (bool (plet_spanner_p_) == bool (p->spantype_ == START))
-    return false;
-
-  Direction d = (!plet_spanner_p_) ? LEFT : RIGHT;
-  if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (p))
-    return false;
-
-  span_reqs_drul_[d] = p;
-  span_mom_drul_[d] = get_staff_info ().musical_l ()->when ();
-  return true;
-}
-
-void
-Plet_engraver::do_removal_processing ()
-{
-  if (plet_spanner_p_)
-    {
-      span_reqs_drul_[LEFT]->warning (_ ("unterminated plet"));
-      plet_spanner_p_->unlink ();
-      delete plet_spanner_p_;
-      plet_spanner_p_ = 0;
-      span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-    }
-}
-
-void
-Plet_engraver::do_process_requests ()
-{
-  if (plet_spanner_p_ || !span_reqs_drul_[LEFT])
-    return;
-
-  plet_spanner_p_ = new Plet_spanner;
-  plet_spanner_p_->tdef_p_->text_str_ = to_str (span_reqs_drul_[LEFT]->plet_i_);
-
-  announce_element (Score_element_info (plet_spanner_p_, span_reqs_drul_[LEFT]));
-}
-
-void
-Plet_engraver::do_pre_move_processing ()
-{
-  if (!plet_spanner_p_ || !span_reqs_drul_[RIGHT]) 
-    return;
-
-  Scalar prop = get_property ("pletvisibility");
-  if (prop.isnum_b ()) 
-    plet_spanner_p_->visibility_i_ = prop;
-
-  if ((beam_mom_drul_[LEFT] <= span_mom_drul_[LEFT])
-     && (beam_mom_drul_[RIGHT] >= span_mom_drul_[RIGHT]))
-     plet_spanner_p_->visibility_i_ &= ~2;
-
-  if (plet_spanner_p_->visibility_i_)
-    typeset_element (plet_spanner_p_);
-  else
-    {
-      plet_spanner_p_->unlink ();
-      delete plet_spanner_p_;
-    }
-  
-  plet_spanner_p_ = 0;
-  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
-}
-
-#endif
diff --git a/lily/plet-swallow-engraver.cc b/lily/plet-swallow-engraver.cc
deleted file mode 100644 (file)
index 3144ebc..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  plet-swallow-engraver.cc -- implement Plet_swallow_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "musical-request.hh"
-#include "plet-swallow-engraver.hh"
-
-
-ADD_THIS_TRANSLATOR(Plet_swallow_engraver);
-
-bool
-Plet_swallow_engraver::do_try_music (Music* req_l)
-{
-  return dynamic_cast<Plet_req *> (req_l);
-}
diff --git a/lily/ties-engraver.cc b/lily/ties-engraver.cc
deleted file mode 100644 (file)
index 63a0390..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-  tie-reg.cc -- implement Ties_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "ties-engraver.hh"
-#include "tie.hh"
-#include "note-head.hh"
-#include "musical-request.hh"
-#include "music-list.hh"
-
-Ties_engraver::Ties_engraver()
-{
-  req_l_ = end_req_l_ =0;
-  processed_ack_pass_i_ = 0;
-  
-}
-
-void
-Ties_engraver::do_post_move_processing()
-{
-  processed_ack_pass_i_ =0;
-}
-
-bool
-Ties_engraver::do_try_music (Music*req)
-{
-  if (Tie_req * r = dynamic_cast <Tie_req *> (req))
-    {  
-      req_l_ = r;
-      return true;
-    }
-  return false;
-}
-
-
-void
-Ties_engraver::acknowledge_element (Score_element_info i)
-{
-  if (!req_l_ && ! end_req_l_)
-    return;
-  if (Note_head * h = dynamic_cast <Note_head *> (i.elem_l_))
-    {
-      Melodic_req *m = dynamic_cast <Melodic_req *> (i.req_l_);
-      
-      head_mel_tuple_arr_.push (Head_melodic_tuple (h, m));
-    }
-}
-
-void
-Ties_engraver::process_acknowledged ()
-{
-  if (!head_mel_tuple_arr_.size () || processed_ack_pass_i_ ++)
-    return;
-
-  head_mel_tuple_arr_.sort (Head_melodic_tuple::compare);
-  if (req_l_ && !tie_p_arr_.size ())
-    {
-      for (int i=0; i < head_mel_tuple_arr_.size (); i++)
-       {
-         Tie*  p = new Tie;
-         p->set_head (LEFT,head_mel_tuple_arr_[i].head_l_);
-         //      announce_element (Score_element_info (p, req_l_));
-         tie_p_arr_.push (p);
-       }
-    }
-
-  if (end_req_l_)
-    {
-      for (int i=0; i < end_tie_p_arr_.size (); i++)
-       {
-         int j = i;
-         if (j >= head_mel_tuple_arr_.size ())
-           {
-             left_head_mel_tuple_arr_[i].mel_l_->warning (_( "Can't find a note head at the right to attach Tie"));
-             j = head_mel_tuple_arr_.size () -1;
-           }
-         
-         Tie*p=end_tie_p_arr_[i];
-         p->set_head (RIGHT, head_mel_tuple_arr_[j].head_l_);
-         if (!Melodic_req::compare (*head_mel_tuple_arr_[j].mel_l_,
-                                    *left_head_mel_tuple_arr_[j].mel_l_))
-           p->same_pitch_b_ = true;
-         announce_element ( Score_element_info (p, end_req_l_));
-       }
-    }
-}
-
-
-void
-Ties_engraver::do_pre_move_processing()
-{
-  if (!head_mel_tuple_arr_.size ())
-    return;
-
-
-  for (int i =0; i < end_tie_p_arr_.size (); i++)
-    {
-      Scalar tie_dir (get_property ("tieYDirection"));
-      Scalar y_dir (get_property ("ydirection"));      
-      Direction dir = CENTER;
-      if (tie_dir.length_i () && tie_dir.isnum_b ())
-       dir = (Direction) sign (int (tie_dir));
-      else if (y_dir.length_i () && y_dir.isnum_b ())
-       dir = (Direction) sign (int (y_dir));
-      
-      end_tie_p_arr_[i]->dir_ = dir;
-      typeset_element (end_tie_p_arr_[i]);
-    }
-
-  end_tie_p_arr_ = tie_p_arr_;
-  left_head_mel_tuple_arr_ = head_mel_tuple_arr_;
-  end_req_l_ = req_l_;
-  
-  req_l_ =0;
-  head_mel_tuple_arr_.clear ();
-  tie_p_arr_.clear ();
-}
-
-void
-Ties_engraver::do_removal_processing ()
-{
-}
-
-void
-Ties_engraver::do_process_requests ()
-{}
-
-
-
-ADD_THIS_TRANSLATOR(Ties_engraver);
-
-
-Head_melodic_tuple::Head_melodic_tuple ()
-{
-  head_l_ =0;
-  mel_l_ =0;
-}
-
-Head_melodic_tuple::Head_melodic_tuple (Note_head *h, Melodic_req*m)
-{
-  head_l_ = h;
-  mel_l_ = m;
-}
-
-int
-Head_melodic_tuple::compare (Head_melodic_tuple const&h1,
-                            Head_melodic_tuple const &h2)
-{
-  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
-}