Class GmmTree


  • public class GmmTree
    extends Object
    GMM logic tree convenience container class that holds a LogicTree<Gmm> and properties derived from a GmmConfig.
    Author:
    U.S. Geological Survey
    • 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.
      • gmms

        public Set<Gmm> gmms()
        The set of GMMs in the logic tree.
      • 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.
      • parseTree

        public static LogicTree<Gmm> parseTree​(com.google.gson.JsonElement e)
        Convenience method to parse a JSON logic tree of GMMs and associated weights.
        Parameters:
        e - JsonElement to parse
        Returns:
        a logic tree of GMMs