Skip to content

Commit a0c6dce

Browse files
committed
changed heatmaps to be able to group mutations by whichever block is given
1 parent fd04a66 commit a0c6dce

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

src/MuTalk-Examples/MTAnalysis.extension.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ MTAnalysis class >> exampleWithHeatmap [
4444
| matrix |
4545
matrix := MTMatrix forClasses: { MyVehicle }.
4646
matrix build.
47-
matrix generateHeatmap
47+
matrix generateHeatmapWithMutationsGroupedByOperator
4848
]
4949

5050
{ #category : '*MuTalk-Examples' }

src/MuTalk-Utilities/MTMatrix.class.st

+23-3
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,10 @@ MTMatrix >> failuresFor: aMutation andTestClass: aTestClass [
196196
]
197197

198198
{ #category : 'rendering' }
199-
MTMatrix >> generateHeatmap [
199+
MTMatrix >> generateHeatmapWithMutationsGroupedBy: aBlock [
200200

201201
| heatmap mutationDictionary testDictionary |
202-
mutationDictionary := mutations groupedBy: [ :mutation |
203-
mutation operator species ].
202+
mutationDictionary := mutations groupedBy: aBlock.
204203
testDictionary := testCases groupedBy: #testCaseClass.
205204

206205
heatmap := self initializeHeatmap.
@@ -216,6 +215,27 @@ MTMatrix >> generateHeatmap [
216215
heatmap open
217216
]
218217

218+
{ #category : 'rendering' }
219+
MTMatrix >> generateHeatmapWithMutationsGroupedByClass [
220+
221+
self generateHeatmapWithMutationsGroupedBy: [ :mutation |
222+
mutation originalClass ]
223+
]
224+
225+
{ #category : 'rendering' }
226+
MTMatrix >> generateHeatmapWithMutationsGroupedByMethod [
227+
228+
self generateHeatmapWithMutationsGroupedBy: [ :mutation |
229+
mutation originalMethod name ]
230+
]
231+
232+
{ #category : 'rendering' }
233+
MTMatrix >> generateHeatmapWithMutationsGroupedByOperator [
234+
235+
self generateHeatmapWithMutationsGroupedBy: [ :mutation |
236+
mutation operator species ]
237+
]
238+
219239
{ #category : 'rendering' }
220240
MTMatrix >> generateMatrix [
221241

0 commit comments

Comments
 (0)