Package gov.usgs.earthquake.nshmp.model
Class SystemRuptureSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- gov.usgs.earthquake.nshmp.model.SystemRuptureSet
-
- All Implemented Interfaces:
RuptureSet<SystemRuptureSet.SystemSource>
,Iterable<SystemRuptureSet.SystemSource>
,Collection<SystemRuptureSet.SystemSource>
,List<SystemRuptureSet.SystemSource>
public class SystemRuptureSet extends AbstractList<T>
Crustal fault-system rupture set.- Author:
- U.S. Geological Survey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SystemRuptureSet.Statistics
Container of summary data for this sytem source set.class
SystemRuptureSet.SystemSource
A single source in a fault system.
-
Field Summary
Fields Modifier and Type Field Description SystemRuptureSet.Statistics
stats
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate<SystemRuptureSet.SystemSource>
distanceFilter(Location loc, double distance)
boolean
equals(Object obj)
List<Feature>
features()
The GeoJSON features for this rupture set.SystemRuptureSet.SystemSource
get(int index)
GmmTree
gmmTree()
Return the ground motion model logic tree associated with thisRuptureSet
.int
hashCode()
int
id()
The numeric ID of this rupture set.Iterable<T>
iterableForLocation(Location loc)
Return anIterable
over thoseSource
s that are within the cutoff distance of the suppliedLocation
.Iterable<T>
iterableForLocation(Location loc, double distance)
Return anIterable
over thoseSource
s that are withindistance
of the suppliedLocation
.Iterator<SystemRuptureSet.SystemSource>
iterator()
Location
location(Location site)
The closest point on the fault trace, relative to the supplied siteLocation
.LogicTree<Mfd>
mfdTree()
The logic tree of MFDs in this rupture set.String
name()
The display name of the rupture set.GriddedSurface
section(int index)
The fault section surface corresponding to the suppliedindex
.String
sectionName(int index)
The name of the fault section corresponding to the suppliedindex
.TectonicSetting
setting()
TheTectonicSetting
identifier.int
size()
static Function<SystemRuptureSet,InputList>
toInputsFunction(Site site)
Return an instance of aFunction
that converts aSystemRuptureSet
to a ground motion modelInputList
.static Function<SystemRuptureSet,IntervalArray>
toRatesFunction(Location location, double distance, IntervalArray modelMfd)
Return an instance of aFunction
that converts aSystemRuptureSet
to a ground motion modelInputList
.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.util.AbstractList
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Methods inherited from interface gov.usgs.earthquake.nshmp.model.RuptureSet
totalMfd
-
-
-
-
Field Detail
-
stats
public final SystemRuptureSet.Statistics stats
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceCollection<SystemRuptureSet.SystemSource>
- Specified by:
size
in interfaceList<SystemRuptureSet.SystemSource>
- Specified by:
size
in classAbstractCollection<SystemRuptureSet.SystemSource>
-
get
public SystemRuptureSet.SystemSource get(int index)
- Specified by:
get
in interfaceList<SystemRuptureSet.SystemSource>
- Specified by:
get
in classAbstractList<SystemRuptureSet.SystemSource>
-
features
public List<Feature> features()
Description copied from interface:RuptureSet
The GeoJSON features for this rupture set. In many cases only a singleFeature
will be returned.
-
mfdTree
public LogicTree<Mfd> mfdTree()
Description copied from interface:RuptureSet
The logic tree of MFDs in this rupture set.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<SystemRuptureSet.SystemSource>
- Specified by:
hashCode
in interfaceList<SystemRuptureSet.SystemSource>
- Overrides:
hashCode
in classAbstractList<SystemRuptureSet.SystemSource>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCollection<SystemRuptureSet.SystemSource>
- Specified by:
equals
in interfaceList<SystemRuptureSet.SystemSource>
- Overrides:
equals
in classAbstractList<SystemRuptureSet.SystemSource>
-
iterator
public Iterator<SystemRuptureSet.SystemSource> iterator()
- Specified by:
iterator
in interfaceCollection<SystemRuptureSet.SystemSource>
- Specified by:
iterator
in interfaceIterable<SystemRuptureSet.SystemSource>
- Specified by:
iterator
in interfaceList<SystemRuptureSet.SystemSource>
- Overrides:
iterator
in classAbstractList<SystemRuptureSet.SystemSource>
-
distanceFilter
public Predicate<SystemRuptureSet.SystemSource> distanceFilter(Location loc, double distance)
Description copied from interface:RuptureSet
Return aPredicate
that evaluates totrue
if this source is withindistance
of the suppliedLocation
. ThisPredicate
performs a quick distance calculation and is used to determine whether this source should be included in a hazard calculation.- Parameters:
loc
-Location
of interestdistance
- limit
-
section
public GriddedSurface section(int index)
The fault section surface corresponding to the suppliedindex
.This method exists because system source sets are complex and commonly encapsulate 100K+ sources. The results of a hazard calculation and disaggregation are therefore better represented in the context of individual fault sections, rather than on a per-source basis.
- Parameters:
index
- of fault section surface to retrieve
-
sectionName
public String sectionName(int index)
The name of the fault section corresponding to the suppliedindex
.- Parameters:
index
- of fault section name to retrieve
-
location
public Location location(Location site)
The closest point on the fault trace, relative to the supplied siteLocation
.
-
toRatesFunction
public static Function<SystemRuptureSet,IntervalArray> toRatesFunction(Location location, double distance, IntervalArray modelMfd)
Return an instance of aFunction
that converts aSystemRuptureSet
to a ground motion modelInputList
.- Parameters:
location
- with which to initialize instance.distance
- if interest (relevant source radius)modelMfd
- MFD to populate
-
toInputsFunction
public static Function<SystemRuptureSet,InputList> toInputsFunction(Site site)
Return an instance of aFunction
that converts aSystemRuptureSet
to a ground motion modelInputList
.- Parameters:
site
- with which to initialize instance.
-
name
public String name()
Description copied from interface:RuptureSet
The display name of the rupture set.- Specified by:
name
in interfaceRuptureSet<T extends Source>
-
id
public int id()
Description copied from interface:RuptureSet
The numeric ID of this rupture set.- Specified by:
id
in interfaceRuptureSet<T extends Source>
-
setting
public TectonicSetting setting()
Description copied from interface:RuptureSet
TheTectonicSetting
identifier.- Specified by:
setting
in interfaceRuptureSet<T extends Source>
-
type
public SourceType type()
Description copied from interface:RuptureSet
TheSourceType
identifier.- Specified by:
type
in interfaceRuptureSet<T extends Source>
-
gmmTree
public GmmTree gmmTree()
Description copied from interface:RuptureSet
Return the ground motion model logic tree associated with thisRuptureSet
.- Specified by:
gmmTree
in interfaceRuptureSet<T extends Source>
-
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<T extends Source>
-
toString
public String toString()
- Overrides:
toString
in classAbstractCollection<T extends Source>
-
iterableForLocation
public Iterable<T> iterableForLocation(Location loc)
Description copied from interface:RuptureSet
Return anIterable
over thoseSource
s that are within the cutoff distance of the suppliedLocation
. The cutoff distance is derived from theGroundMotionModel
s associated with thisRuptureSet
.- Specified by:
iterableForLocation
in interfaceRuptureSet<T extends Source>
- Parameters:
loc
-Location
of interest
-
iterableForLocation
public Iterable<T> iterableForLocation(Location loc, double distance)
Description copied from interface:RuptureSet
Return anIterable
over thoseSource
s that are withindistance
of the suppliedLocation
.- Specified by:
iterableForLocation
in interfaceRuptureSet<T extends Source>
- Parameters:
loc
-Location
of interestdistance
- limit
-
-