cannam@18: /* cannam@18: * Segmenter.cpp cannam@18: * cannam@18: * Created by Mark Levy on 04/04/2006. Chris@84: * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. Chris@84: Chris@84: This program is free software; you can redistribute it and/or Chris@84: modify it under the terms of the GNU General Public License as Chris@84: published by the Free Software Foundation; either version 2 of the Chris@84: License, or (at your option) any later version. See the file Chris@84: COPYING included with this distribution for more information. cannam@18: * cannam@18: */ cannam@18: cannam@18: #include cannam@18: cannam@18: #include "Segmenter.h" cannam@18: cannam@18: ostream& operator<<(ostream& os, const Segmentation& s) cannam@18: { cannam@18: os << "structure_name : begin_time end_time\n"; cannam@18: cannam@18: for (int i = 0; i < s.segments.size(); i++) cannam@18: { cannam@18: Segment seg = s.segments[i]; cannam@18: os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast(s.samplerate) cannam@18: << '\t' << std::setprecision(6) << seg.end / static_cast(s.samplerate) << "\n"; cannam@18: } cannam@18: cannam@18: return os; cannam@18: }