Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More customizable heatmaps #129

Merged
merged 4 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MuTalk-Examples/MTAnalysis.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MTAnalysis class >> exampleWithHeatmap [
| matrix |
matrix := MTMatrix forClasses: { MyVehicle }.
matrix build.
matrix generateHeatmap
matrix generateHeatmapByMethod
]

{ #category : '*MuTalk-Examples' }
Expand Down
20 changes: 18 additions & 2 deletions src/MuTalk-Utilities/MTAnalysis.extension.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
Extension { #name : 'MTAnalysis' }

{ #category : '*MuTalk-Utilities' }
MTAnalysis >> generateHeatmap [
MTAnalysis >> generateHeatmapByClass [

| matrix |
matrix := MTMatrix new analysis: self.
matrix generateHeatmap
matrix generateHeatmapByClass
]

{ #category : '*MuTalk-Utilities' }
MTAnalysis >> generateHeatmapByMethod [

| matrix |
matrix := MTMatrix new analysis: self.
matrix generateHeatmapByMethod
]

{ #category : '*MuTalk-Utilities' }
MTAnalysis >> generateHeatmapByOperator [

| matrix |
matrix := MTMatrix new analysis: self.
matrix generateHeatmapByOperator
]

{ #category : '*MuTalk-Utilities' }
Expand Down
26 changes: 23 additions & 3 deletions src/MuTalk-Utilities/MTMatrix.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,31 @@ MTMatrix >> fillMatrix [
]

{ #category : 'rendering' }
MTMatrix >> generateHeatmap [
MTMatrix >> generateHeatmapByClass [

self generateHeatmapWithMutationsGroupedBy: [ :mutation |
mutation originalClass ]
]

{ #category : 'rendering' }
MTMatrix >> generateHeatmapByMethod [

self generateHeatmapWithMutationsGroupedBy: [ :mutation |
mutation originalMethod name ]
]

{ #category : 'rendering' }
MTMatrix >> generateHeatmapByOperator [

self generateHeatmapWithMutationsGroupedBy: [ :mutation |
mutation operator species ]
]

{ #category : 'rendering' }
MTMatrix >> generateHeatmapWithMutationsGroupedBy: aBlock [

| heatmap mutationDictionary testDictionary |
mutationDictionary := mutations groupedBy: [ :mutation |
mutation operator species ].
mutationDictionary := mutations groupedBy: aBlock.
testDictionary := testCases groupedBy: #testCaseClass.

heatmap := self initializeHeatmap.
Expand Down
Loading