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