Package gov.usgs.earthquake.nshmp.model
Class GriddedRuptureSet
- java.lang.Object
-
- gov.usgs.earthquake.nshmp.model.GriddedRuptureSet
-
- All Implemented Interfaces:
RuptureSet
,Iterable<GridSource>
- Direct Known Subclasses:
GridRuptureSet
public abstract class GriddedRuptureSet extends Object implements Iterable<GridSource>
Base implementation for gridded rupture sets. Although most implementations in USGS NSHMs to date are uniformely spaced in latitude and longitude, this class makes no requirement that they be.- Author:
- U.S. Geological Survey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract GridSource
getNode(int index)
Get the grid source at the specified node.GmmTree
gmmTree()
Return the ground motion model logic tree associated with this Rupture Set.int
id()
The numeric ID of this rupture set.Iterator<GridSource>
iterator()
abstract List<Location>
locations()
The list of grid node locations in this rupture set.String
name()
The display name of the rupture set.TectonicSetting
setting()
TheTectonicSetting
of this rupture set.Iterable<GridSource>
siteIterable(Location site)
Returns an iterable over the grid sources within the cuttoff distance from asite
.Iterable<GridSource>
siteIterable(Location site, double distance)
Returns an iterable over the grid sources within the specifieddistance
from asite
.int
size()
The number of grid nodes in this rupture set.String
toString()
SourceType
type()
TheSourceType
identifier.double
weight()
The weight of theSourceTree
branch to which this rupture set is attached.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface gov.usgs.earthquake.nshmp.model.RuptureSet
features, location, mfdTree, totalMfd
-
-
-
-
Method Detail
-
size
public int size()
The number of grid nodes in this rupture set.- Specified by:
size
in interfaceRuptureSet
-
locations
public abstract List<Location> locations()
The list of grid node locations in this rupture set.
-
getNode
public abstract GridSource getNode(int index)
Get the grid source at the specified node.- Parameters:
index
- of the node to retrieve
-
iterator
public Iterator<GridSource> iterator()
- Specified by:
iterator
in interfaceIterable<GridSource>
-
siteIterable
public Iterable<GridSource> siteIterable(Location site)
Returns an iterable over the grid sources within the cuttoff distance from asite
. The cutoff distance is derived from theGroundMotionModel
s associated with this rupture set.- Parameters:
site
- of interest- See Also:
RuptureSet.gmmTree()
-
siteIterable
public Iterable<GridSource> siteIterable(Location site, double distance)
Returns an iterable over the grid sources within the specifieddistance
from asite
.- Parameters:
site
- of interestdistance
- from the site within which grid sources are returned by this iterator
-
name
public String name()
Description copied from interface:RuptureSet
The display name of the rupture set.- Specified by:
name
in interfaceRuptureSet
-
id
public int id()
Description copied from interface:RuptureSet
The numeric ID of this rupture set.- Specified by:
id
in interfaceRuptureSet
-
setting
public TectonicSetting setting()
Description copied from interface:RuptureSet
TheTectonicSetting
of this rupture set.- Specified by:
setting
in interfaceRuptureSet
-
type
public SourceType type()
Description copied from interface:RuptureSet
TheSourceType
identifier.- Specified by:
type
in interfaceRuptureSet
-
gmmTree
public GmmTree gmmTree()
Description copied from interface:RuptureSet
Return the ground motion model logic tree associated with this Rupture Set.- Specified by:
gmmTree
in interfaceRuptureSet
-
weight
public double weight()
Description copied from interface:RuptureSet
The weight of theSourceTree
branch to which this rupture set is attached.- Specified by:
weight
in interfaceRuptureSet
-
-