public class PivotTable extends Object
CSet
s)
of category columns. The values for cells belonging to the same
CSet
are aggregated for each distinct
ICounterNode.getName()
.Modifier and Type | Field and Description |
---|---|
ICounter[] |
a
The selected counters (redundant reference to
HistoryTable.a . |
String[] |
cnames
An array of category column names.
|
List<CSet> |
csets
Aggregation of the selected counters (
a ) into sets sharing
the same category values. |
HistoryTable |
src
The HistoryTable (converts counter hierarchy into regular table).
|
LinkedHashSet<String> |
vcols
The ordered set of distinct counter names.
|
Constructor and Description |
---|
PivotTable(Pattern pattern,
String[] category,
HistoryTable t) |
Modifier and Type | Method and Description |
---|---|
protected static List<CSet> |
getCategoryValueSets(Pattern pattern,
ICounter[] a,
AtomicInteger ngroups)
The set of distinct ordered matched sets of category values in the
current row of the history table paired with the
ICounter s
matched up on those category values. |
public final HistoryTable src
public final ICounter[] a
HistoryTable.a
.public final LinkedHashSet<String> vcols
public final List<CSet> csets
a
) into sets sharing
the same category values.public final String[] cnames
URLQueryModel.CATEGORY
public PivotTable(Pattern pattern, String[] category, HistoryTable t)
pattern
- The pattern used to specify the counters of interest and the
capturing groups which determined how the counters will be
aggregated.
If a capturing group is used for the counter name then that
capturing group will be ignored. This makes it easier switch
back and forth between a PivotTable
and a
HistoryTable
. If the counter name was in fact treated
as a capturing group for the purposes of determining the
category columns, then that would give you a distinct row for
every sample and blanks in the other value columns.
category
- The ordered labels to be assigned to the category columns
(optional). When given, the order of the category names
parameters MUST correspond with the order of the capturing
groups in the pattern.t
- The source data.protected static List<CSet> getCategoryValueSets(Pattern pattern, ICounter[] a, AtomicInteger ngroups)
ICounter
s
matched up on those category values.
Note: This automatically detects if the last capturing group captures the counter name and then drop that from the set of category columns. This makes it much easier to switch between a correlated view and a pivot view since you often want the counter name to be a capturing group for the correlated view.
ngroups
- The #of capturing groups which were actually used (by
side-effect). This is either the #of capturing groups which
were specified in the pattern -or- one less than that
value iff the last capturing group captures the counter name.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.