Package gov.usgs.earthquake.nshmp.model
Class GmmTree
- java.lang.Object
-
- gov.usgs.earthquake.nshmp.model.GmmTree
-
public class GmmTree extends Object
GMM logic tree convenience container class that holds aLogicTree<Gmm>
and properties derived from aGmmConfig
.- Author:
- U.S. Geological Survey
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GmmTree
create(LogicTree<Gmm> tree, Optional<gov.usgs.earthquake.nshmp.model.GmmConfig> config)
Create a new GMM logic tree container.Set<Gmm>
gmms()
The set of GMMs in the logic tree.double
gmmWeight(Gmm gmm)
The logic tree weight of the requested GMM.OptionalDouble
maxDistance()
The maximum applicable distance for the GMMs in the logic tree.static LogicTree<Gmm>
parseTree(com.google.gson.JsonElement e)
Convenience method to parse a JSON logic tree of GMMs and associated weights.LogicTree<Gmm>
tree()
The GMM logic tree.
-
-
-
Method Detail
-
create
public static GmmTree create(LogicTree<Gmm> tree, Optional<gov.usgs.earthquake.nshmp.model.GmmConfig> config)
Create a new GMM logic tree container.
-
gmmWeight
public double gmmWeight(Gmm gmm)
The logic tree weight of the requested GMM.- Throws:
NullPointerException
- if the supplied GMM is not in this tree
-
maxDistance
public OptionalDouble maxDistance()
The maximum applicable distance for the GMMs in the logic tree.
-
-