public void addMarker(){
  ClusterOrder order=getClusterOrder();
  DBIDSelection selContext=context.getSelection();
  if (selContext != null) {
    DBIDs selection=DBIDUtil.ensureSet(selContext.getSelectedIds());
    final double width=plotwidth / order.size();
    int begin=-1, j=0;
    for (DBIDIter it=order.iter(); it.valid(); it.advance(), j++) {
      if (selection.contains(it)) {
        if (begin == -1) {
          begin=j;
        }
      }
 else {
        if (begin != -1) {
          Element marker=addMarkerRect(begin * width,(j - begin) * width);
          SVGUtil.addCSSClass(marker,CSS_MARKER);
          mtag.appendChild(marker);
          begin=-1;
        }
      }
    }
    if (begin != -1) {
      Element marker=addMarkerRect(begin * width,(order.size() - begin) * width);
      SVGUtil.addCSSClass(marker,CSS_MARKER);
      mtag.appendChild(marker);
    }
  }
}

public void addMarker ( ) { ClusterOrder order = getClusterOrder ( ) ; DBIDSelection selContext = context . getSelection ( ) ; if ( selContext != null ) { DBIDs selection = DBIDUtil . ensureSet ( selContext . getSelectedIds ( ) ) ; final double width = plotwidth / order . size ( ) ; int begin = - 1 , j = 0 ; for ( DBIDIter it = order . iter ( ) ; it . valid ( ) ; it . advance ( ) , j ++ ) { if ( selection . contains ( it ) ) { if ( begin == - 1 ) { begin = j ; } } else { if ( begin != - 1 ) { Element marker = addMarkerRect ( begin * width , ( j - begin ) * width ) ; SVGUtil . addCSSClass ( marker , CSS_MARKER ) ; mtag . appendChild ( marker ) ; begin = - 1 ; } } } if ( begin != - 1 ) { Element marker = addMarkerRect ( begin * width , ( order . size ( ) - begin ) * width ) ; SVGUtil . addCSSClass ( marker , CSS_MARKER ) ; mtag . appendChild ( marker ) ; } } }
add marker for the selected ids to mtag
