File tree Expand file tree Collapse file tree 3 files changed +42
-6
lines changed
Expand file tree Collapse file tree 3 files changed +42
-6
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ MTAnalysis class >> exampleWithHeatmap [
4444 | matrix |
4545 matrix := MTMatrix forClasses: { MyVehicle }.
4646 matrix build.
47- matrix generateHeatmap
47+ matrix generateHeatmapByMethod
4848]
4949
5050{ #category : ' *MuTalk-Examples' }
Original file line number Diff line number Diff line change 11Extension { #name : ' MTAnalysis' }
22
33{ #category : ' *MuTalk-Utilities' }
4- MTAnalysis >> generateHeatmap [
4+ MTAnalysis >> generateHeatmapByClass [
55
66 | matrix |
77 matrix := MTMatrix new analysis: self .
8- matrix generateHeatmap
8+ matrix generateHeatmapByClass
9+ ]
10+
11+ { #category : ' *MuTalk-Utilities' }
12+ MTAnalysis >> generateHeatmapByMethod [
13+
14+ | matrix |
15+ matrix := MTMatrix new analysis: self .
16+ matrix generateHeatmapByMethod
17+ ]
18+
19+ { #category : ' *MuTalk-Utilities' }
20+ MTAnalysis >> generateHeatmapByOperator [
21+
22+ | matrix |
23+ matrix := MTMatrix new analysis: self .
24+ matrix generateHeatmapByOperator
925]
1026
1127{ #category : ' *MuTalk-Utilities' }
Original file line number Diff line number Diff line change @@ -213,11 +213,31 @@ MTMatrix >> fillMatrix [
213213]
214214
215215{ #category : ' rendering' }
216- MTMatrix >> generateHeatmap [
216+ MTMatrix >> generateHeatmapByClass [
217+
218+ self generateHeatmapWithMutationsGroupedBy: [ :mutation |
219+ mutation originalClass ]
220+ ]
221+
222+ { #category : ' rendering' }
223+ MTMatrix >> generateHeatmapByMethod [
224+
225+ self generateHeatmapWithMutationsGroupedBy: [ :mutation |
226+ mutation originalMethod name ]
227+ ]
228+
229+ { #category : ' rendering' }
230+ MTMatrix >> generateHeatmapByOperator [
231+
232+ self generateHeatmapWithMutationsGroupedBy: [ :mutation |
233+ mutation operator species ]
234+ ]
235+
236+ { #category : ' rendering' }
237+ MTMatrix >> generateHeatmapWithMutationsGroupedBy: aBlock [
217238
218239 | heatmap mutationDictionary testDictionary |
219- mutationDictionary := mutations groupedBy: [ :mutation |
220- mutation operator species ].
240+ mutationDictionary := mutations groupedBy: aBlock.
221241 testDictionary := testCases groupedBy: #testCaseClass .
222242
223243 heatmap := self initializeHeatmap.
You can’t perform that action at this time.
0 commit comments