org.opensha.sha.earthquake.griddedForecast
Class MagFreqDistsForFocalMechs

java.lang.Object
  extended by org.opensha.sha.earthquake.griddedForecast.MagFreqDistsForFocalMechs
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HypoMagFreqDistAtLoc

public class MagFreqDistsForFocalMechs
extends java.lang.Object
implements java.io.Serializable

Title: HypoMagFreqDistAtLoc

Description: This stores a list magFreqDists with associated a list of focal mechanisms (each must have the same number in the list unless the focal mech list is null).

Version:
1.0
Author:
Ned Field
See Also:
Serialized Form

Field Summary
protected  FocalMechanism[] focalMechanism
           
protected  IncrementalMagFreqDist[] magFreqDist
           
 
Constructor Summary
MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist)
          Class Constructor.
MagFreqDistsForFocalMechs(IncrementalMagFreqDist[] magDist)
          Class Constructor.
MagFreqDistsForFocalMechs(IncrementalMagFreqDist[] magDist, FocalMechanism[] focalMechanism)
          Class constructor.
MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist, FocalMechanism focalMechanism)
          Class constructor.
MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist, FocalMechanism[] focalMechanism, double[] wt)
          This constructor allows a user to give a single magDist, a list of focalMechanisms, and a list of weights.
 
Method Summary
 FocalMechanism getFirstFocalMech()
          Returns the first MagFreqDist from the list.
 IncrementalMagFreqDist getFirstMagFreqDist()
          Returns the first MagFreqDist from the list.
 FocalMechanism getFocalMech(int index)
           
 FocalMechanism[] getFocalMechanismList()
          Returns the list of Focal Mechanism.
 IncrementalMagFreqDist getMagFreqDist(int index)
           
 IncrementalMagFreqDist[] getMagFreqDistList()
          Returns the list of MagFreqDists.
 int getNumFocalMechs()
           
 int getNumMagFreqDists()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

magFreqDist

protected IncrementalMagFreqDist[] magFreqDist

focalMechanism

protected FocalMechanism[] focalMechanism
Constructor Detail

MagFreqDistsForFocalMechs

public MagFreqDistsForFocalMechs(IncrementalMagFreqDist[] magDist)
Class Constructor. In this case the no focalMechanisms are specified.

Parameters:
magDist - IncrementalMagFreqDist[] list of MagFreqDist.

MagFreqDistsForFocalMechs

public MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist)
Class Constructor. This is for passing in a single magFreqDist (don't have to create an array) and no focal mechanism.

Parameters:
magDist - IncrementalMagFreqDist MagFreqDist.

MagFreqDistsForFocalMechs

public MagFreqDistsForFocalMechs(IncrementalMagFreqDist[] magDist,
                                 FocalMechanism[] focalMechanism)
Class constructor. This constructor allows user to give a list of focalMechanisms and magDists.

Parameters:
magDist - IncrementalMagFreqDist[] list of magFreqDist, same as number of focal mechanisms.
focalMechanism - FocalMechanism[] list of focal mechanism for a given location.

MagFreqDistsForFocalMechs

public MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist,
                                 FocalMechanism focalMechanism)
Class constructor. This constructor allows user to give a single magFreqDist and focalMechanism.

Parameters:
magDist - IncrementalMagFreqDist
focalMechanism - FocalMechanism

MagFreqDistsForFocalMechs

public MagFreqDistsForFocalMechs(IncrementalMagFreqDist magDist,
                                 FocalMechanism[] focalMechanism,
                                 double[] wt)
This constructor allows a user to give a single magDist, a list of focalMechanisms, and a list of weights. The list of focal mechanisms is made by assigning the associated weight to the the given magDist.

Parameters:
magDist - an IncrementalMagFreqDist.
focalMechanism - FocalMechanism[] list of focal mechanism for a given location.
wts - - a list os weights that must be in the same order as FocalMechanism[].
Method Detail

getFocalMechanismList

public FocalMechanism[] getFocalMechanismList()
Returns the list of Focal Mechanism.

Returns:
FocalMechanism[]

getMagFreqDistList

public IncrementalMagFreqDist[] getMagFreqDistList()
Returns the list of MagFreqDists.

Returns:
IncrementalMagFreqDist[]

getNumMagFreqDists

public int getNumMagFreqDists()

getNumFocalMechs

public int getNumFocalMechs()

getMagFreqDist

public IncrementalMagFreqDist getMagFreqDist(int index)

getFocalMech

public FocalMechanism getFocalMech(int index)

getFirstMagFreqDist

public IncrementalMagFreqDist getFirstMagFreqDist()
Returns the first MagFreqDist from the list. This function can be used when there are not multiple MagFreqDists and no Focal Mechanism,

Returns:
IncrementalMagFreqDist

getFirstFocalMech

public FocalMechanism getFirstFocalMech()
Returns the first MagFreqDist from the list. This function can be used when there are not multiple MagFreqDists and no Focal Mechanism,

Returns:
IncrementalMagFreqDist