Related
kendo version 2015.1.429
I can't figure out why this doesn't work. I've been fighting with it for hours to no avail. I've tried all sorts of variations on the axis name, etc.
Any ideas?
#(Html.Kendo().Chart<OTIS.AppServ.Reporting.ViewModels.ItemDailyForecast>()
.Name("chart_ItemForecastByDay")
.Theme("Silver")
.HtmlAttributes(new { #class = "widgetFullWidth" })
.Title("Item Daily Forecast")
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
.Visible(true)
)
.Events(events => events
.Render("hideChartLoadingImage")
)
.AutoBind(true)
.DataSource(ds => ds
.Read(read => read.Action("GetItemForecastByDay", "InventoryReports", new { area = "Reporting", intItemId = Model, intDaysOut = 90}))
.Sort(sort =>
{
sort.Add(model => model.Date).Ascending();
})
)
.Series(series =>
{
series
.Line(model => model.DailyUnitBalanceQty)
//.Column(model => model.DailyUnitBalanceQty)
.Name("Units Avail")
//.Color("#5cbe2d")
.Aggregate(ChartSeriesAggregate.Sum)
.Axis("Axis1")
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= series.name # (#= kendo.toString(category, 'd') #, #= kendo.format('{0:n0}', value) #)")
)
;
})
.Series(series =>
{
series
.Line(model => model.DailyDaysOnHandQty)
//.Column(model => model.DailyDaysOnHandQty)
.Name("Days On Hand")
//.Color("#5cbe2d")
.Aggregate(ChartSeriesAggregate.Sum)
.Axis("Axis1")
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= series.name # (#= kendo.toString(category, 'd') #, #= kendo.format('{0:n0}', value) #)")
)
;
})
.Series(series =>
{
series
.Column(model => model.DailyReceiptQty)
.Name("Receipt Qty")
//.Color("#5cbe2d")
.Aggregate(ChartSeriesAggregate.Sum)
.Axis("Axis1")
.Spacing(0.0)
.Gap(0.0)
.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= series.name # (#= kendo.toString(category, 'd') #, #= kendo.format('{0:n0}', value) #)")
)
;
})
.CategoryAxis(axis => axis
.Date()
.BaseUnit(ChartAxisBaseUnit.Days)
.Categories(model => model.Date)
.Labels(labels => {
labels.Rotation(90);
}
)
.AxisCrossingValue(0, 1000)
)
.ValueAxis(axis => axis
.Numeric("Axis1")
.Labels(labels => labels.Format("{0:n0}"))
.PlotBands(bands =>
{
//bands.Add().From(-10).To(50).Color("#c00").Opacity(0.3);
bands.Add().From(49).To(50).Color("#c00").Opacity(0.8);
})
)
.ChartArea(chartArea => chartArea
.Background("transparent")
.Height(300)
)
.PlotArea(plotArea => plotArea
.Background("transparent")
//.Margin(40)
)
)
<script>
$(function(){
var chart = $("#chart_ItemForecastByDay").data("kendoChart");
options["categoryAxis"] = { plotBands: [{ from: "3/17/2019", to: "3/20/2019", color: "green", opacity: 0.3 }] };
options["yAxis"] = { plotBands: [{ from: 20, to: 30, color: "blue", opacity: 0.3 }] };
options["valueAxis"] = { plotBands: [{ from: 10, to: 20, color: "yellow", opacity: 0.3 }] };
options["Axis1"] = { plotBands: [{ from: 10, to: 20, color: "yellow", opacity: 0.3 }] };
chart.setOptions(options);
}
</script>
For Categorical Charts types we should use the categoryAxis and valueAxis plotBands.
<script>
var stats = [
{ value: 48, date: new Date("2014/01/01") },
{ value: 50, date: new Date("2014/01/02") },
{ value: 55, date: new Date("2014/01/03") },
{ value: 35, date: new Date("2014/01/04") },
{ value: 30, date: new Date("2014/01/05") },
{ value: 30, date: new Date("2014/01/20") },
{ value: 50, date: new Date("2014/01/21") },
{ value: 45, date: new Date("2014/01/22") },
{ value: 40, date: new Date("2014/01/23") },
{ value: 35, date: new Date("2014/01/24") },
{ value: 40, date: new Date("2014/01/25") },
{ value: 42, date: new Date("2014/01/26") },
{ value: 40, date: new Date("2014/01/27") },
{ value: 35, date: new Date("2014/01/28") },
{ value: 43, date: new Date("2014/01/29") },
{ value: 38, date: new Date("2014/01/30") },
{ value: 30, date: new Date("2014/01/31") }
];
$("#chart").kendoChart({
dataSource: {
data: stats
},
series: [{
type: "column",
aggregate: "avg",
field: "value",
categoryField: "date"
}],
categoryAxis: {
type: "date",
majorGridLines: {
visible: false
}
},
valueAxis: {
line: {
visible: false
}
}
});
$(function(){
var chart = $("#chart").data("kendoChart");
var options = {};
var fromDate = new Date("2014/01/15");
var toDate = new Date("2014/01/20");;
options["categoryAxis"] = { plotBands: [{ from: fromDate, to: toDate, color: "green", opacity: 0.3 }] };
options["valueAxis"] = { plotBands: [{ from: 10, to: 20, color: "yellow", opacity: 0.3 }] };
chart.setOptions(options);
});
</script>
While for the Scatter Chart types we should use xAxis and yAxis plotBands
<script>
function createChart() {
$("#chart").kendoChart({
title: {
text: "Rainfall - Wind Speed"
},
legend: {
position: "bottom"
},
seriesDefaults: {
type: "scatter"
},
series: [{
name: "January 2008",
data: [
[16.4, 5.4], [21.7, 2], [25.4, 3], [19, 2], [10.9, 1], [13.6, 3.2], [10.9, 7.4], [10.9, 0], [10.9, 8.2], [16.4, 0], [16.4, 1.8], [13.6, 0.3], [13.6, 0], [29.9, 0], [27.1, 2.3], [16.4, 0], [13.6, 3.7], [10.9, 5.2], [16.4, 6.5], [10.9, 0], [24.5, 7.1], [10.9, 0], [8.1, 4.7], [19, 0], [21.7, 1.8], [27.1, 0], [24.5, 0], [27.1, 0], [29.9, 1.5], [27.1, 0.8], [22.1, 2]]
},{
name: "January 2009",
data: [
[6.4, 13.4], [1.7, 11], [5.4, 8], [9, 17], [1.9, 4], [3.6, 12.2], [1.9, 14.4], [1.9, 9], [1.9, 13.2], [1.4, 7], [6.4, 8.8], [3.6, 4.3], [1.6, 10], [9.9, 2], [7.1, 15], [1.4, 0], [3.6, 13.7], [1.9, 15.2], [6.4, 16.5], [0.9, 10], [4.5, 17.1], [10.9, 10], [0.1, 14.7], [9, 10], [2.7, 11.8], [2.1, 10], [2.5, 10], [27.1, 10], [2.9, 11.5], [7.1, 10.8], [2.1, 12]]
},{
name: "January 2010",
data: [
[21.7, 3], [13.6, 3.5], [13.6, 3], [29.9, 3], [21.7, 20], [19, 2], [10.9, 3], [28, 4], [27.1, 0.3], [16.4, 4], [13.6, 0], [19, 5], [16.4, 3], [24.5, 3], [32.6, 3], [27.1, 4], [13.6, 6], [13.6, 8], [13.6, 5], [10.9, 4], [16.4, 0], [32.6, 10.3], [21.7, 20.8], [24.5, 0.8], [16.4, 0], [21.7, 6.9], [13.6, 7.7], [16.4, 0], [8.1, 0], [16.4, 0], [16.4, 0]]
}],
xAxis: {
max: 35,
title: {
text: "Wind Speed [km/h]"
},
crosshair: {
visible: true,
tooltip: {
visible: true,
format: "n1"
}
}
},
yAxis: {
min: -5,
max: 25,
title: {
text: "Rainfall [mm]"
},
axisCrossingValue: -5,
crosshair: {
visible: true,
tooltip: {
visible: true,
format: "n1"
}
}
}
});
var chart = $("#chart").data("kendoChart");
var options = {};
var fromDate = new Date("2014/01/15");
var toDate = new Date("2014/01/20");;
options["xAxis"] = { plotBands: [{ from: 10, to: 20, color: "yellow", opacity: 0.3 }] };
options["yAxis"] = { plotBands: [{ from: -5, to: 0, color: "red", opacity: 0.3 }] };
chart.setOptions(options);
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
I would like to achieve the following in an efficient way in numpy. Suppose I have a matrix
A = np.asarray([[1, 2], [3, 4]])
and
B = np.asarray([1, 10, 100])
I would like to multiply each element in A with the first element of B, then each element in A with the second element in B etc. At the end a matrix of shape (A.shape[0]*B.shape[0], A.shape[1])
the result should be
np.asarray([[1, 2], [3, 4], [10, 20], [30, 40], [100, 200], [300, 400]])
Out[216]:
array([[ 1, 2],
[ 3, 4],
[ 10, 20],
[ 30, 40],
[100, 200],
[300, 400]])
Reshape with numpy broadcasting:
# option 1
(A * B[:,None,None]).reshape(-1, A.shape[1])
#array([[ 1, 2],
# [ 3, 4],
# [ 10, 20],
# [ 30, 40],
# [100, 200],
# [300, 400]])
# option 2
(A.ravel() * B[:,None]).reshape(-1, A.shape[1])
#array([[ 1, 2],
# [ 3, 4],
# [ 10, 20],
# [ 30, 40],
# [100, 200],
# [300, 400]])
Or use np.einsum:
np.einsum('ij,k->kij', A, B).reshape(-1, A.shape[1])
#array([[ 1, 2],
# [ 3, 4],
# [ 10, 20],
# [ 30, 40],
# [100, 200],
# [300, 400]])
I have a list of strings that I'm trying to split into separate lists sequentially, grouping the 4th occurrence i.e. this list:
val data = List("1", "2", "3", "4", "5", "6", "7", "8")
should be grouped as
val list1 = List("1", "5")
val list2 = List("2", "6")
val list3 = List("3", "7")
val list4 = List("4", "8")
I'm not sure if I am trying to overcomplicate this but the only way I can think is to first group the elements using sliding e.g.:
data.sliding(4,4).toList
results in
List(List(1, 2, 3, 4), List(5, 6, 7, 8))
and then to implement my own unzip method that would group the above as my desired output.
Please can someone let me know if there is an easier way of doing this?
You can use .transpose on the list .sliding generates:
scala> val data = List("1", "2", "3", "4", "5", "6", "7", "8")
data: List[String] = List(1, 2, 3, 4, 5, 6, 7, 8)
scala> data.sliding(4, 4).toList
res1: List[List[String]] = List(List(1, 2, 3, 4), List(5, 6, 7, 8))
scala> data.sliding(4, 4).toList.transpose
res2: List[List[String]] = List(List(1, 5), List(2, 6), List(3, 7), List(4, 8))
A version which will work for every list length:
def groupNth[A](n: Int, list: List[A]): List[List[A]] = {
val (firstN, rest) = list.splitAt(n)
val groupedRest = if (rest.nonEmpty) groupNth(n, rest) else Nil
// null.asInstanceOf[A] is of course cheating, but the value is never used
firstN.zipAll(groupedRest, null.asInstanceOf[A], Nil).map {
case (h, t) => h :: t
}
}
println(groupNth(4, Nil))
// List()
println(groupNth(4, List(1, 2, 3)))
// List(List(1), List(2), List(3))
println(groupNth(4, List(1, 2, 3, 4, 5, 6, 7, 8)))
// List(List(1, 5), List(2, 6), List(3, 7), List(4, 8))
println(groupNth(4, List(1, 2, 3, 4, 5, 6, 7, 8, 9)))
// List(List(1, 5, 9), List(2, 6), List(3, 7), List(4, 8))
println(groupNth(4, List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)))
// List(List(1, 5, 9), List(2, 6, 10), List(3, 7, 11), List(4, 8, 12))
zip after sliding
scala> val data = List("1", "2", "3", "4", "5", "6", "7", "8")
data: List[String] = List("1", "2", "3", "4", "5", "6", "7", "8")
scala> val result = data.sliding(4, 4).toList
result: List[List[String]] = List(List("1", "2", "3", "4"), List("5", "6", "7", "8"))
scala> result.transpose
res7: List[(String, String)] = List(("1", "5"), ("2", "6"), ("3", "7"), ("4", "8"))
If tuples would do as output, it's fairly neat:
val tuples = data zip data.drop(4)
//> tuples : List[(String, String)] = List((1,5), (2,6), (3,7), (4,8))
turn them into List:
tuples.map{case(a,b) => List(a, b)}
//> List[List[String]] = List(List(1, 5), List(2, 6), List(3, 7), List(4, 8))
EDIT: Showing that the comment about only working with 8 is incorrect
def pairs[A](xs:List[A], n:Int) =
(xs zip xs.drop(n)).map{case(a,b) => List(a, b)}
pairs(List("1","2", "3", "4", "5", "6", "7", "8"), 4)
// List(List(1, 5), List(2, 6), List(3, 7), List(4, 8))
pairs(List("1","2", "3", "4", "5", "6", "7", "8", "9"), 4)
// List(List(1, 5), List(2, 6), List(3, 7), List(4, 8), List(5, 9))
pairs(List("1","2", "3", "4", "5", "6", "7", "8", "9", "10"), 4)
// List(List(1, 5), List(2, 6), List(3, 7), List(4, 8), List(5, 9), List(6, 10))
pairs(List("1","2", "3", "4"), 4)
// List()
pairs(List("1","2", "3"), 4)
// List()
I am creating a Google line chart as per Google Line Chart Documentation.
I want to style the colour of the line such that it is a gradient between two colours, say between Green and Red. The weighting of each colour should be controlled by the 'y' value of the line.
i.e. at the point where the line's 'y' value is 0, the line will be completely green, At the highest 'y' value on the it should be completely red. In between values should have a weighting depending on the value of y at that point.
Is this possible? If so, how?
Since Google Line Chart is SVG based, you could customize how the line can change from one color to another via linearGradient element.
The below example shows how to inject [linearGradient element] into the chart (google.visualization.LineChart):
google.load('visualization', '1', { packages: ['corechart', 'line'] });
google.setOnLoadCallback(drawBackgroundColor);
function drawBackgroundColor() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'X');
data.addColumn('number', 'Dogs');
data.addRows([
[0, 0], [1, 10], [2, 23], [3, 17], [4, 18], [5, 9],
[6, 11], [7, 27], [8, 33], [9, 40], [10, 32], [11, 35],
[12, 30], [13, 40], [14, 42], [15, 47], [16, 44], [17, 48],
[18, 52], [19, 54], [20, 42], [21, 55], [22, 56], [23, 57],
[24, 60], [25, 50], [26, 52], [27, 51], [28, 49], [29, 53],
[30, 55], [31, 60], [32, 61], [33, 59], [34, 62], [35, 65],
[36, 62], [37, 58], [38, 55], [39, 61], [40, 64], [41, 65],
[42, 63], [43, 66], [44, 67], [45, 69], [46, 69], [47, 70],
[48, 72], [49, 68], [50, 66], [51, 65], [52, 67], [53, 70],
[54, 71], [55, 72], [56, 73], [57, 75], [58, 70], [59, 68],
[60, 64], [61, 60], [62, 65], [63, 60], [64, 50], [65, 45],
[66, 40], [67, 42], [68, 35], [69, 30]
]);
var options = {
hAxis: {
title: 'Time'
},
vAxis: {
title: 'Popularity'
},
backgroundColor: '#f1f8e9'
};
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
google.visualization.events.addOneTimeListener(chart, 'ready', function () {
addChartGradient(chart);
});
chart.draw(data, options);
}
function addChartGradient(chart) {
var chartDiv = chart.getContainer();
var svg = chartDiv.getElementsByTagName('svg')[0];
var properties = {
id: "chartGradient",
x1: "0%",
y1: "0%",
x2: "0%",
y2: "100%",
stops: [
{ offset: '5%', 'stop-color': '#f60' },
{ offset: '95%', 'stop-color': '#ff6' }
]
};
createGradient(svg, properties);
var chartPath = svg.getElementsByTagName('path')[1]; //0 path corresponds to legend path
chartPath.setAttribute('stroke', 'url(#chartGradient)');
}
function createGradient(svg, properties) {
var svgNS = svg.namespaceURI;
var grad = document.createElementNS(svgNS, 'linearGradient');
grad.setAttribute('id', properties.id);
["x1","y1","x2","y2"].forEach(function(name) {
if (properties.hasOwnProperty(name)) {
grad.setAttribute(name, properties[name]);
}
});
for (var i = 0; i < properties.stops.length; i++) {
var attrs = properties.stops[i];
var stop = document.createElementNS(svgNS, 'stop');
for (var attr in attrs) {
if (attrs.hasOwnProperty(attr)) stop.setAttribute(attr, attrs[attr]);
}
grad.appendChild(stop);
}
var defs = svg.querySelector('defs') ||
svg.insertBefore(document.createElementNS(svgNS, 'defs'), svg.firstChild);
return defs.appendChild(grad);
}
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<div id="chart_div"></div>
JSFiddle
Hello I have following c++ code
class classBase
{
public:
int get1(){return 1;}
int get2(){return 2;}
};
class classDer:public classBase
{
public:
int get1(){return 1;}
};
int f()
{
classDer x;
return x.get1();
}
I use following clangExample.cpp -S -emit-llvm -o - command and get
; ModuleID = 'C:\clangParam\clangExample.cpp'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i686-pc-win32"
%class.classDer = type { i8 }
define i32 #_Z1fv() {
entry:
%x = alloca %class.classDer, align 1
%call = call i32 #_ZN8classDer4get1Ev(%class.classDer* %x)
ret i32 %call
}
define linkonce_odr i32 #_ZN8classDer4get1Ev(%class.classDer* %this) nounwind align 2 {
entry:
%this.addr = alloca %class.classDer*, align 4
store %class.classDer* %this, %class.classDer** %this.addr, align 4
%this1 = load %class.classDer** %this.addr
ret i32 1
}
why there is no reference to the base class?(going over clang code for type generation I got the feeling that the base class type should be referenced.
Update
It makes sense
But if I use Template definition
template<class T>
class classTemplate
{
public:
T getMax(T in1,T in2){if(in2 > in1) return in2;return in1;}
};
int f()
{
classTemplate<int> x;
return x.getMax(3,4);
}
I get clang output
C:\Windows\system32>clang C:\clangParam\clangExample.cpp -S -emit-llvm -o -
; ModuleID = 'C:\clangParam\clangExample.cpp'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i686-pc-win32"
%class.classTemplate = type { i8 }
define i32 #_Z1fv() {
entry:
%x = alloca %class.classTemplate, align 1
%call = call i32 #_ZN13classTemplateIiE6getMaxEii(%class.classTemplate* %x, i32 3, i32 4)
ret i32 %call
}
define linkonce_odr i32 #_ZN13classTemplateIiE6getMaxEii(%class.classTemplate* %this, i32 %in1, i32 %in2) nounwind align 2 {
entry:
%retval = alloca i32, align 4
%this.addr = alloca %class.classTemplate*, align 4
%in1.addr = alloca i32, align 4
%in2.addr = alloca i32, align 4
store %class.classTemplate* %this, %class.classTemplate** %this.addr, align 4
store i32 %in1, i32* %in1.addr, align 4
store i32 %in2, i32* %in2.addr, align 4
%this1 = load %class.classTemplate** %this.addr
%tmp = load i32* %in2.addr, align 4
%tmp2 = load i32* %in1.addr, align 4
%cmp = icmp sgt i32 %tmp, %tmp2
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%tmp3 = load i32* %in2.addr, align 4
store i32 %tmp3, i32* %retval
br label %return
if.end: ; preds = %entry
%tmp4 = load i32* %in1.addr, align 4
store i32 %tmp4, i32* %retval
br label %return
return: ; preds = %if.end, %if.then
%0 = load i32* %retval
ret i32 %0
}
There is again no reference to template class though I initialize it.
The reason why it is not exported and not even compiled is because functions inside class-declarations are inlined. That means they are only known and compiled inside that particular codefile.
If you would put the class-declaration into a headerfile each .cpp-file would compile the code for the get1() and get2() functions seperately (so it would be present twice in the final executable).
ClassBase::get1() and ClassBase::get2() are never referenced, and so they are left out.
The same applies for the possibility of class-overloading: The compiler knows, that there is no derivative of any of the classes, because he sees all there could possibly be.
Why do you expect debug information without passing -g? This outputs a lot of metadata nodes:
// clang++ -g3 -S -emit-llvm main1.cpp
// ...
!0 = metadata !{i32 589841, i32 0, i32 4, metadata !"main1.cpp", metadata !"/home/js/cpp", metadata !"clang version 3.0 (trunk 134121)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
!1 = metadata !{i32 589870, i32 0, metadata !2, metadata !"f", metadata !"f", metadata !"_Z1fv", metadata !2, i32 16, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, i32 ()* #_Z1fv, null, null} ; [ DW_TAG_subprogram ]
!2 = metadata !{i32 589865, metadata !"main1.cpp", metadata !"/home/js/cpp", metadata !0} ; [ DW_TAG_file_type ]
!3 = metadata !{i32 589845, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
!4 = metadata !{metadata !5}
!5 = metadata !{i32 589860, metadata !0, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
!6 = metadata !{i32 589870, i32 0, metadata !7, metadata !"get1", metadata !"get1", metadata !"_ZN9classBase4get1Ev", metadata !2, i32 5, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null} ; [ DW_TAG_subprogram ]
!7 = metadata !{i32 589826, metadata !0, metadata !"classBase", metadata !2, i32 2, i64 8, i64 8, i32 0, i32 0, null, metadata !8, i32 0, null, null} ; [ DW_TAG_class_type ]
!8 = metadata !{metadata !6, metadata !9, metadata !13}
!9 = metadata !{i32 589870, i32 0, metadata !7, metadata !"get2", metadata !"get2", metadata !"_ZN9classBase4get2Ev", metadata !2, i32 6, metadata !10, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null} ; [ DW_TAG_subprogram ]
!10 = metadata !{i32 589845, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !11, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
!11 = metadata !{metadata !5, metadata !12}
!12 = metadata !{i32 589839, metadata !0, metadata !"", i32 0, i32 0, i64 32, i64 32, i64 0, i32 64, metadata !7} ; [ DW_TAG_pointer_type ]
!13 = metadata !{i32 589870, i32 0, metadata !7, metadata !"classBase", metadata !"classBase", metadata !"", metadata !2, i32 2, metadata !14, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null} ; [ DW_TAG_subprogram ]
!14 = metadata !{i32 589845, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !15, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
!15 = metadata !{null, metadata !12}
!16 = metadata !{i32 589870, i32 0, metadata !17, metadata !"get1", metadata !"get1", metadata !"_ZN8classDer4get1Ev", metadata !2, i32 11, metadata !24, i1 false, i1 false, i32 0, i32 0, null, i32 256, i1 false, null, null} ; [ DW_TAG_subprogram ]
!17 = metadata !{i32 589826, metadata !0, metadata !"classDer", metadata !2, i32 8, i64 8, i64 8, i32 0, i32 0, null, metadata !18, i32 0, null, null} ; [ DW_TAG_class_type ]
!18 = metadata !{metadata !19, metadata !16, metadata !20}
!19 = metadata !{i32 589852, metadata !17, null, metadata !2, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !7} ; [ DW_TAG_inheritance ]
!20 = metadata !{i32 589870, i32 0, metadata !17, metadata !"classDer", metadata !"classDer", metadata !"", metadata !2, i32 8, metadata !21, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null} ; [ DW_TAG_subprogram ]
!21 = metadata !{i32 589845, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !22, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
!22 = metadata !{null, metadata !23}
!23 = metadata !{i32 589839, metadata !0, metadata !"", i32 0, i32 0, i64 32, i64 32, i64 0, i32 64, metadata !17} ; [ DW_TAG_pointer_type ]
!24 = metadata !{i32 589845, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !25, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
!25 = metadata !{metadata !5, metadata !23}
!26 = metadata !{i32 589870, i32 0, metadata !0, metadata !"get1", metadata !"get1", metadata !"_ZN8classDer4get1Ev", metadata !2, i32 11, metadata !24, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 false, i32 (%class.classDer*)* #_ZN8classDer4get1Ev, null, metadata !16} ; [ DW_TAG_subprogram ]
!27 = metadata !{i32 590080, metadata !28, metadata !"x", metadata !2, i32 17, metadata !17, i32 0} ; [ DW_TAG_auto_variable ]
!28 = metadata !{i32 589835, metadata !1, i32 16, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ]
!29 = metadata !{i32 17, i32 14, metadata !28, null}
!30 = metadata !{i32 18, i32 5, metadata !28, null}
!31 = metadata !{i32 590081, metadata !26, metadata !"this", metadata !2, i32 16777227, metadata !23, i32 64} ; [ DW_TAG_arg_variable ]
!32 = metadata !{i32 11, i32 9, metadata !26, null}
!33 = metadata !{i32 11, i32 16, metadata !34, null}
!34 = metadata !{i32 589835, metadata !26, i32 11, i32 15, metadata !2, i32 1} ; [ DW_TAG_lexical_block ]
Looking for the class-type tags, you find
!7 = metadata !{i32 589826, metadata !0, metadata !"classBase", metadata !2, i32 2, i64 8, i64 8, i32 0, i32 0, null, metadata !8, i32 0, null, null} ; [ DW_TAG_class_type ]
!17 = metadata !{i32 589826, metadata !0, metadata !"classDer", metadata !2, i32 8, i64 8, i64 8, i32 0, i32 0, null, metadata !18, i32 0, null, null} ; [ DW_TAG_class_type ]