Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
508139e2
Commit
508139e2
authored
9 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
calc config builder javadoc
parent
fe4cc9ca
No related branches found
No related tags found
1 merge request
!58
Implemented gmm additional epistemic uncertainty
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/opensha2/calc/CalcConfig.java
+16
-0
16 additions, 0 deletions
src/org/opensha2/calc/CalcConfig.java
with
16 additions
and
0 deletions
src/org/opensha2/calc/CalcConfig.java
+
16
−
0
View file @
508139e2
...
@@ -317,6 +317,9 @@ public final class CalcConfig {
...
@@ -317,6 +317,9 @@ public final class CalcConfig {
private
DeaggData
deagg
;
private
DeaggData
deagg
;
private
SiteSet
sites
;
private
SiteSet
sites
;
/**
* Initialize a new builder with a copy of that supplied.
*/
public
Builder
copy
(
CalcConfig
config
)
{
public
Builder
copy
(
CalcConfig
config
)
{
checkNotNull
(
config
);
checkNotNull
(
config
);
this
.
resource
=
config
.
resource
;
this
.
resource
=
config
.
resource
;
...
@@ -332,6 +335,9 @@ public final class CalcConfig {
...
@@ -332,6 +335,9 @@ public final class CalcConfig {
return
this
;
return
this
;
}
}
/**
* Initialize a new builder with defaults.
*/
public
Builder
withDefaults
()
{
public
Builder
withDefaults
()
{
this
.
exceedanceModel
=
ExceedanceModel
.
TRUNCATION_UPPER_ONLY
;
this
.
exceedanceModel
=
ExceedanceModel
.
TRUNCATION_UPPER_ONLY
;
this
.
truncationLevel
=
3.0
;
this
.
truncationLevel
=
3.0
;
...
@@ -348,6 +354,10 @@ public final class CalcConfig {
...
@@ -348,6 +354,10 @@ public final class CalcConfig {
return
this
;
return
this
;
}
}
/**
* Extend {@code this} builder to match {@code that} builder. Fields in
* that builder take precedence unless they are not set.
*/
public
Builder
extend
(
final
Builder
that
)
{
public
Builder
extend
(
final
Builder
that
)
{
checkNotNull
(
that
);
checkNotNull
(
that
);
if
(
that
.
resource
!=
null
)
this
.
resource
=
that
.
resource
;
if
(
that
.
resource
!=
null
)
this
.
resource
=
that
.
resource
;
...
@@ -363,6 +373,9 @@ public final class CalcConfig {
...
@@ -363,6 +373,9 @@ public final class CalcConfig {
return
this
;
return
this
;
}
}
/**
* Set the IMTs for which results should be calculated.
*/
public
Builder
imts
(
Set
<
Imt
>
imts
)
{
public
Builder
imts
(
Set
<
Imt
>
imts
)
{
this
.
imts
=
checkNotNull
(
imts
);
this
.
imts
=
checkNotNull
(
imts
);
return
this
;
return
this
;
...
@@ -409,6 +422,9 @@ public final class CalcConfig {
...
@@ -409,6 +422,9 @@ public final class CalcConfig {
built
=
true
;
built
=
true
;
}
}
/**
* Build a new calculation configuration.
*/
public
CalcConfig
build
()
{
public
CalcConfig
build
()
{
validateState
(
ID
);
validateState
(
ID
);
Set
<
Imt
>
finalImts
=
Sets
.
immutableEnumSet
(
imts
);
Set
<
Imt
>
finalImts
=
Sets
.
immutableEnumSet
(
imts
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment