Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMAM2Middleware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
1c45718a
Commit
1c45718a
authored
Mar 13, 2019
by
Alexander David Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache score if metric is not changed
parent
40c2735c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/main/java/de/monticore/lang/monticar/generator/middleware/clustering/ClusteringResult.java
...car/generator/middleware/clustering/ClusteringResult.java
+11
-2
No files found.
src/main/java/de/monticore/lang/monticar/generator/middleware/clustering/ClusteringResult.java
View file @
1c45718a
...
...
@@ -29,6 +29,8 @@ public class ClusteringResult {
private
int
componentNumber
;
private
boolean
valid
;
private
Metric
metric
;
private
double
score
;
private
boolean
sameMetric
=
false
;
private
ClusteringResult
(
ClusteringInput
clusteringInput
,
AlgorithmCliParameters
parameters
,
List
<
Set
<
EMAComponentInstanceSymbol
>>
clustering
,
long
duration
,
int
componentNumber
,
boolean
valid
,
Metric
metric
)
{
...
...
@@ -80,11 +82,18 @@ public class ClusteringResult {
}
public
void
setMetric
(
Metric
metric
){
this
.
metric
=
metric
;
if
(
this
.
metric
!=
metric
)
{
this
.
metric
=
metric
;
sameMetric
=
false
;
}
}
public
double
getScore
(){
return
metric
.
getScore
(
this
);
if
(!
sameMetric
)
{
sameMetric
=
true
;
score
=
metric
.
getScore
(
this
);
}
return
score
;
}
public
EMAComponentInstanceSymbol
getComponent
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment