Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
CNNTrainLang
Commits
adf69ddf
Commit
adf69ddf
authored
Jul 19, 2019
by
Nicola Gatto
Browse files
Add convenient methods for configuration
parent
18344e12
Pipeline
#162444
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/cnntrain/_symboltable/ConfigurationSymbol.java
View file @
adf69ddf
...
...
@@ -102,4 +102,22 @@ public class ConfigurationSymbol extends CommonScopeSpanningSymbol {
return
this
.
entryMap
.
containsKey
(
"learning_method"
)
?
(
LearningMethod
)
this
.
entryMap
.
get
(
"learning_method"
).
getValue
().
getValue
()
:
LearningMethod
.
SUPERVISED
;
}
public
boolean
isReinforcementLearningMethod
()
{
return
getLearningMethod
().
equals
(
LearningMethod
.
REINFORCEMENT
);
}
public
boolean
hasCritic
()
{
return
getEntryMap
().
containsKey
(
"critic"
);
}
public
Optional
<
String
>
getCriticName
()
{
if
(!
hasCritic
())
{
return
Optional
.
empty
();
}
final
Object
criticNameValue
=
getEntry
(
"critic"
).
getValue
().
getValue
();
assert
criticNameValue
instanceof
String
;
return
Optional
.
of
((
String
)
criticNameValue
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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