-
-String
-Col_stats::str () const
-{
- String s;
- if (!count_i_)
- s = _ ("0 lines");
- else if (count_i_ == 1)
- s = _f ("1 line (of %.0f columns)", (Real)cols_i_/count_i_);
- else
- s = _f ("%d lines (with an average of %.1f columns)",
- count_i_, (Real)cols_i_/count_i_);
- return s;
-}
-
-void
-Col_stats::add (Line_of_cols const& line)
-{
- count_i_++;
- cols_i_ += line.size ();
-}
-
-
-Col_stats::Col_stats ()
-{
- count_i_ =0;
- cols_i_ =0;
-}
-
-/* **************************************************************** */
-
-
-Array<int>
-Break_algorithm::find_break_indices () const
-{
- Line_of_cols all (pscore_l_->col_l_arr_);
- Array<int> retval;
-
- for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b ())
- retval.push (i);
-
- if (linelength <=0)
- while (retval.size () >2)
- retval.del (1);
-
- return retval;
-}
-
-
-Line_of_cols