Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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-lib
Commits
309e1833
Commit
309e1833
authored
2 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
ground motion logic tree toString
parent
88a75456
No related branches found
No related tags found
1 merge request
!273
Site, tree, and NGA-East edits
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/gmm/GroundMotions.java
+35
-5
35 additions, 5 deletions
...ain/java/gov/usgs/earthquake/nshmp/gmm/GroundMotions.java
with
35 additions
and
5 deletions
src/main/java/gov/usgs/earthquake/nshmp/gmm/GroundMotions.java
+
35
−
5
View file @
309e1833
...
@@ -165,6 +165,11 @@ public class GroundMotions {
...
@@ -165,6 +165,11 @@ public class GroundMotions {
return
1
;
return
1
;
}
}
@Override
public
String
toString
()
{
return
LogicTree
.
toString
(
this
);
}
@Override
@Override
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
return
new
Branch
<
GroundMotion
>()
{
return
new
Branch
<
GroundMotion
>()
{
...
@@ -183,6 +188,11 @@ public class GroundMotions {
...
@@ -183,6 +188,11 @@ public class GroundMotions {
public
double
weight
()
{
public
double
weight
()
{
return
1.0
;
return
1.0
;
}
}
@Override
public
String
toString
()
{
return
Branch
.
toString
(
this
);
}
};
};
}
}
}
}
...
@@ -218,6 +228,16 @@ public class GroundMotions {
...
@@ -218,6 +228,16 @@ public class GroundMotions {
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
}
}
@Override
public
int
size
()
{
return
μs
.
length
;
}
@Override
public
String
toString
()
{
return
LogicTree
.
toString
(
this
);
}
@Override
@Override
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
return
new
Branch
<
GroundMotion
>()
{
return
new
Branch
<
GroundMotion
>()
{
...
@@ -235,12 +255,12 @@ public class GroundMotions {
...
@@ -235,12 +255,12 @@ public class GroundMotions {
public
double
weight
()
{
public
double
weight
()
{
return
wts
[
index
];
return
wts
[
index
];
}
}
};
}
@Override
@Override
public
int
size
()
{
public
String
toString
()
{
return
μs
.
length
;
return
Branch
.
toString
(
this
);
}
};
}
}
}
}
...
@@ -288,6 +308,11 @@ public class GroundMotions {
...
@@ -288,6 +308,11 @@ public class GroundMotions {
return
μs
.
length
*
σs
.
length
;
return
μs
.
length
*
σs
.
length
;
}
}
@Override
public
String
toString
()
{
return
LogicTree
.
toString
(
this
);
}
@Override
@Override
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
public
Branch
<
GroundMotion
>
get
(
int
index
)
{
return
new
Branch
<
GroundMotion
>()
{
return
new
Branch
<
GroundMotion
>()
{
...
@@ -314,6 +339,11 @@ public class GroundMotions {
...
@@ -314,6 +339,11 @@ public class GroundMotions {
public
double
weight
()
{
public
double
weight
()
{
return
μWts
[
μIndex
]
*
σWts
[
σIndex
];
return
μWts
[
μIndex
]
*
σWts
[
σIndex
];
}
}
@Override
public
String
toString
()
{
return
Branch
.
toString
(
this
);
}
};
};
}
}
}
}
...
...
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