Mixxx

CLAM::DiscontinuousSegmentation Class Reference

#include <DiscontinuousSegmentation.hxx>

Inheritance diagram for CLAM::DiscontinuousSegmentation:
Collaboration diagram for CLAM::DiscontinuousSegmentation:

List of all members.

Classes

class  InsertedOutOfBounds
class  MissplacedOffset
class  MissplacedOnset
class  OffsetMissing

Public Types

typedef std::vector< double > TimePositions

Public Member Functions

 DiscontinuousSegmentation (double maxPosition=0)
 DiscontinuousSegmentation (double maxPosition, const TData *begin, const TData *end)
void takeArray (const TData *begin, const TData *end)
unsigned insert (double timePosition)
unsigned insert (double timePosition, std::string label)
void remove (unsigned segment)
unsigned pickOffset (double timePosition, double tolerance) const
unsigned pickOnset (double timePosition, double tolerance) const
unsigned pickSegmentBody (double timePosition) const
void dragOnset (unsigned segment, double newTimePosition)
void dragOffset (unsigned segment, double newTimePosition)
const char * GetClassName () const

Detailed Description

Definition at line 8 of file DiscontinuousSegmentation.hxx.


Member Typedef Documentation

Reimplemented from CLAM::Segmentation.

Definition at line 55 of file DiscontinuousSegmentation.hxx.


Constructor & Destructor Documentation

CLAM::DiscontinuousSegmentation::DiscontinuousSegmentation ( double  maxPosition = 0) [inline]

Definition at line 57 of file DiscontinuousSegmentation.hxx.

CLAM::DiscontinuousSegmentation::DiscontinuousSegmentation ( double  maxPosition,
const TData begin,
const TData end 
) [inline]

It will create a discontinuous segmentation where the onsets and offsets are specified on the ordered list of bounds [begin,end)

Precondition:
The onsets is a sorted container of bounds in between 0 and maxPosition

Definition at line 67 of file DiscontinuousSegmentation.hxx.

Here is the call graph for this function:


Member Function Documentation

void CLAM::DiscontinuousSegmentation::dragOffset ( unsigned  segment,
double  newTimePosition 
) [inline, virtual]

Performs a dragging movement for the Offset of the given segment in order to move it to the newTimePosition. Constraints for the segmentation mode are applied.

Implements CLAM::Segmentation.

Definition at line 218 of file DiscontinuousSegmentation.hxx.

Here is the caller graph for this function:

void CLAM::DiscontinuousSegmentation::dragOnset ( unsigned  segment,
double  newTimePosition 
) [inline, virtual]

Performs a dragging movement for the Onset of the given segment in order to move it to the newTimePosition. Constraints for the segmentation mode are applied.

Implements CLAM::Segmentation.

Definition at line 196 of file DiscontinuousSegmentation.hxx.

const char* CLAM::DiscontinuousSegmentation::GetClassName ( ) const [inline]

Fills a DataArray with the segmentation markers

Reimplemented from CLAM::Segmentation.

Definition at line 249 of file DiscontinuousSegmentation.hxx.

unsigned CLAM::DiscontinuousSegmentation::insert ( double  timePosition) [inline, virtual]

Inserts a new border at timePosition.

Implements CLAM::Segmentation.

Definition at line 99 of file DiscontinuousSegmentation.hxx.

Here is the caller graph for this function:

unsigned CLAM::DiscontinuousSegmentation::insert ( double  timePosition,
std::string  label 
) [inline]

Inserts a new border at timePosition and adds a label to the new segment.

Definition at line 138 of file DiscontinuousSegmentation.hxx.

Here is the call graph for this function:

unsigned CLAM::DiscontinuousSegmentation::pickOffset ( double  timePosition,
double  tolerance 
) const [inline, virtual]

Returns the index of the segment whose offset is nearest to the given time position, and within the tolerance. If no end of segment within the tolerance range an invalid segment is returned (nSegments)

Implements CLAM::Segmentation.

Definition at line 164 of file DiscontinuousSegmentation.hxx.

unsigned CLAM::DiscontinuousSegmentation::pickOnset ( double  timePosition,
double  tolerance 
) const [inline, virtual]

Returns the index of the segment whose onset is nearest to the given time position, and within the tolerance. If no end of segment within the tolerance range an invalid segment is returned (nSegments)

Implements CLAM::Segmentation.

Definition at line 174 of file DiscontinuousSegmentation.hxx.

unsigned CLAM::DiscontinuousSegmentation::pickSegmentBody ( double  timePosition) const [inline, virtual]

Returns the index of the segment which body is on timePosition.

Implements CLAM::Segmentation.

Definition at line 181 of file DiscontinuousSegmentation.hxx.

void CLAM::DiscontinuousSegmentation::remove ( unsigned  segment) [inline, virtual]

Removes the specified segment. The previous segment is expanded to cover the region. When removing the first segment, the next segment is the one expanded to start at 0. When just a single element, no efect at all.

Implements CLAM::Segmentation.

Definition at line 150 of file DiscontinuousSegmentation.hxx.

Here is the caller graph for this function:

void CLAM::DiscontinuousSegmentation::takeArray ( const TData begin,
const TData end 
) [inline, virtual]

take data from an array.

Implements CLAM::Segmentation.

Definition at line 75 of file DiscontinuousSegmentation.hxx.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines