Skip to content
Snippets Groups Projects
Commit 23caa322 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

gmm supportedIMT method signature change

parent 151fcf79
No related branches found
No related tags found
1 merge request!231Gmm cleaning
......@@ -1542,7 +1542,7 @@ public enum Gmm {
* Return the {@code Set} of the intensity measure types ({@code Imt}s)
* supported by this {@code Gmm}.
*/
public Set<Imt> supportedIMTs() {
public Set<Imt> supportedImts() {
return imts;
}
......@@ -1552,10 +1552,10 @@ public enum Gmm {
*
* @param gmms models for which to return common {@code Imt} support
*/
public static Set<Imt> supportedIMTs(Collection<Gmm> gmms) {
public static Set<Imt> supportedImts(Collection<Gmm> gmms) {
Set<Imt> imts = EnumSet.allOf(Imt.class);
for (Gmm gmm : gmms) {
imts = Sets.intersection(imts, gmm.supportedIMTs());
imts = Sets.intersection(imts, gmm.supportedImts());
}
return EnumSet.copyOf(imts);
}
......@@ -1564,7 +1564,7 @@ public enum Gmm {
* Return the set of spectral acceleration {@code Imt}s that are supported by
* this {@code Gmm}.
*/
public Set<Imt> responseSpectrumIMTs() {
public Set<Imt> responseSpectrumImts() {
return Sets.intersection(imts, Imt.saImts());
}
......@@ -1574,8 +1574,8 @@ public enum Gmm {
*
* @param gmms models for which to return common SA {@code Imt} support
*/
public static Set<Imt> responseSpectrumIMTs(Collection<Gmm> gmms) {
return Sets.intersection(supportedIMTs(gmms), Imt.saImts());
public static Set<Imt> responseSpectrumImts(Collection<Gmm> gmms) {
return Sets.intersection(supportedImts(gmms), Imt.saImts());
}
/**
......
......@@ -140,7 +140,7 @@ class UsgsPgvSupport {
* @return ScalarGroundMotion for target T(PGV)
*/
static GroundMotion calcSaGroundMotion(Gmm gmm, GmmInput in) {
Set<Imt> saImts = gmm.responseSpectrumIMTs();
Set<Imt> saImts = gmm.responseSpectrumImts();
// need to verify that this Set is being returned with ascending
// iteration order; that is, when we loop over them
//
......
......@@ -106,7 +106,7 @@ class UsgsPgvSupportTest implements ArgumentsProvider {
double nativeSigmaPgv = -1;
String nativePgvStr;
String nativeSigmaPgvStr;
if (gmm.supportedIMTs().contains(PGV)) {
if (gmm.supportedImts().contains(PGV)) {
// BCH supports PGV now (via UsgsPgvSupport), so none of these GMMs
// will bypass this
GroundMotion sgmPgv = GroundMotions.combine(gmm.instance(PGV).calc(in));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment