1 /*******************************************************************************
2 * Copyright (c) 2011 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 ******************************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.distribution
.model
;
15 * <b><u>VerDistributionData</u></b>
17 * Implementation of DistributionData for vertical direction.
20 public class VerDistributionData
extends DistributionData
{
22 // ------------------------------------------------------------------------
24 // ------------------------------------------------------------------------
25 public VerDistributionData(int nbBuckets
, int[][] buckets
) {
26 super(nbBuckets
, buckets
);
29 // ------------------------------------------------------------------------
30 // Abstract function implementation
31 // ------------------------------------------------------------------------
35 * @see org.eclipse.linuxtools.lttng.ui.views.distribution.model.DistributionData#moveBuckets(int)
38 protected void moveBuckets(int offset
) {
39 for (int j
= 0; j
< fNbBuckets
; j
++) {
41 for(int i
= fNbBuckets
- 1; i
>= offset
; i
--) {
42 fBuckets
[j
][i
] = fBuckets
[j
][i
-offset
];
45 for (int i
= 0; i
< offset
; i
++) {
53 * @see org.eclipse.linuxtools.lttng.ui.views.distribution.model.DistributionData#mergeBuckets()
56 protected void mergeBuckets() {
57 for (int x
= 0; x
< fNbBuckets
; x
++) {
58 for (int i
= 0; i
< fNbBuckets
/ 2; i
++) {
59 fBuckets
[x
][i
] = fBuckets
[x
][2 * i
] + fBuckets
[x
][2 * i
+ 1];
61 for (int i
= fNbBuckets
/ 2; i
< fNbBuckets
; i
++) {
65 fBucketDuration
= fBucketDuration
* 2;
67 fLastBucket
= fNbBuckets
/ 2 - 1;
This page took 0.032777 seconds and 5 git commands to generate.