annotate dsp/segmentation/Segmenter.cpp @ 83:67899fda84f5

* Remove some unused code; minor tidy
author cannam
date Wed, 01 Dec 2010 14:05:25 +0000
parents 8e90a56b4b5f
children e5907ae6de17
rev   line source
cannam@18 1 /*
cannam@18 2 * Segmenter.cpp
cannam@18 3 *
cannam@18 4 * Created by Mark Levy on 04/04/2006.
cannam@18 5 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. All rights reserved.
cannam@18 6 *
cannam@18 7 */
cannam@18 8
cannam@18 9 #include <iomanip>
cannam@18 10
cannam@18 11 #include "Segmenter.h"
cannam@18 12
cannam@18 13 ostream& operator<<(ostream& os, const Segmentation& s)
cannam@18 14 {
cannam@18 15 os << "structure_name : begin_time end_time\n";
cannam@18 16
cannam@18 17 for (int i = 0; i < s.segments.size(); i++)
cannam@18 18 {
cannam@18 19 Segment seg = s.segments[i];
cannam@18 20 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
cannam@18 21 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
cannam@18 22 }
cannam@18 23
cannam@18 24 return os;
cannam@18 25 }