public class Dvector
extends java.lang.Object
basicDataFileから Dvectorを構築する
This class is immutable.
TODO 同じ震源観測点ペアの波形も周波数やタイムウインドウによってあり得るから それに対処 varianceも
| コンストラクタと説明 |
|---|
Dvector(BasicID[] basicIDs)
Use all waveforms in the IDs.
|
Dvector(BasicID[] basicIDs,
java.util.function.Predicate<BasicID> chooser)
Use selected waveforms.
|
Dvector(BasicID[] basicIDs,
java.util.function.Predicate<BasicID> chooser,
java.util.function.ToDoubleBiFunction<BasicID,BasicID> weightingFunction)
Use selected waveforms.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
org.apache.commons.math3.linear.RealVector |
combine(org.apache.commons.math3.linear.RealVector[] vectors)
Every vector must have the same length as the corresponding timewindow.
|
org.apache.commons.math3.linear.RealVector |
getD() |
double |
getDNorm() |
org.apache.commons.math3.linear.RealVector[] |
getDVectors()
The returning vector is unmodifiable.
|
java.util.Map<GlobalCMTID,java.lang.Double> |
getEventVariance() |
int[] |
getLengths() |
int |
getNpts() |
int |
getNTimeWindow() |
org.apache.commons.math3.linear.RealVector |
getObs() |
BasicID[] |
getObsIDs() |
double |
getObsNorm() |
org.apache.commons.math3.linear.RealVector[] |
getObsVectors() |
int |
getStartPoints(int i) |
java.util.Map<Station,java.lang.Double> |
getStationVariance() |
org.apache.commons.math3.linear.RealVector |
getSyn() |
BasicID[] |
getSynIDs() |
org.apache.commons.math3.linear.RealVector[] |
getSynVectors() |
java.util.Set<GlobalCMTID> |
getUsedGlobalCMTIDset() |
java.util.Set<Station> |
getUsedStationSet() |
double |
getVariance() |
double |
getWeighting(int i) |
void |
outOrder(java.nio.file.Path outPath)
syn.dat del.dat obs.dat obsOrder synOrder.datを outDirectory下に書き込む
|
void |
outputVarianceOf(java.nio.file.Path outPath,
org.apache.commons.math3.linear.RealVector[] vectors)
vectors(各タイムウインドウ)に対して、観測波形とのvarianceを求めてファイルに書き出す
Create event folders under the outPath and variances are written for each path.
|
org.apache.commons.math3.linear.RealVector[] |
separate(org.apache.commons.math3.linear.RealVector vector) |
public Dvector(BasicID[] basicIDs)
basicIDs - must contain waveform datapublic Dvector(BasicID[] basicIDs, java.util.function.Predicate<BasicID> chooser)
basicIDs - must contain waveform datachooser - Predicate for selection of obs data to be usedpublic Dvector(BasicID[] basicIDs, java.util.function.Predicate<BasicID> chooser, java.util.function.ToDoubleBiFunction<BasicID,BasicID> weightingFunction)
basicIDs - must contain waveform datachooser - Predicate used for filtering Observed (not synthetic)
ID. If one ID is true, then the observed ID and the pair
synthetic are used.weightingFunction - ToDoubleBiFunction (observed, synthetic). If null, the reciprocal of the max value in observed is a weighting value.public java.util.Map<GlobalCMTID,java.lang.Double> getEventVariance()
public java.util.Map<Station,java.lang.Double> getStationVariance()
public org.apache.commons.math3.linear.RealVector combine(org.apache.commons.math3.linear.RealVector[] vectors)
vectors - to combinepublic org.apache.commons.math3.linear.RealVector[] getDVectors()
combine(RealVector[])public org.apache.commons.math3.linear.RealVector getD()
public int[] getLengths()
public int getNpts()
public int getNTimeWindow()
public BasicID[] getObsIDs()
public org.apache.commons.math3.linear.RealVector[] getObsVectors()
public org.apache.commons.math3.linear.RealVector getObs()
public int getStartPoints(int i)
i - index of timewindowpublic BasicID[] getSynIDs()
public org.apache.commons.math3.linear.RealVector[] getSynVectors()
public org.apache.commons.math3.linear.RealVector getSyn()
public java.util.Set<GlobalCMTID> getUsedGlobalCMTIDset()
public java.util.Set<Station> getUsedStationSet()
public double getWeighting(int i)
i - index for the weightingpublic void outOrder(java.nio.file.Path outPath)
throws java.io.IOException
outPath - Path for writejava.io.IOException - if an I/O error occurspublic void outputVarianceOf(java.nio.file.Path outPath,
org.apache.commons.math3.linear.RealVector[] vectors)
throws java.io.IOException
outPath - Root for the writevectors - RealVectors for writejava.io.IOException - if an I/O error occurspublic double getVariance()
public double getObsNorm()
public double getDNorm()
public org.apache.commons.math3.linear.RealVector[] separate(org.apache.commons.math3.linear.RealVector vector)
vector - to separate